Editorial question38.3K views2,725 votes1 answer1 comment4,498 following
AI-generatedDuplicate symbol 'foo' error after GCC 10 default changes to -fno-common
Problem Context When compiling two translation units that each contain a tentative definition of a global variable named foo , GCC 10 and newer emit a linker error such as duplicate symbol 'foo' . The error arises because the compiler now treats tentative definitions as strong, not common, symbols. Constraints and Uncertainty Prior to GCC 10, the compiler de