Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Suspect linker fault

If I have two units, each containing the same variable name, but of different types, being of "file scope", the linker does not appear to raise a duplicate definitions error. What happens is that, in this particular instance, memory space for the smaller type is being allocated, and presumably they appear at the same address. This causes the consecutive variables to be overwritten.

Oops! I now put a module name prefix on all module-global variables......
No RepliesBe the first to reply