Skip to content
Snippets Groups Projects
user avatar
Nick Zavaritsky authored
A 'tentative definition' in C language is a global variable definition
missing both a storage class and an initializer, ex: int foo.
Traditionally it get's translated into a common symbol, allowing for
multiple definitions in different translation units to coexist.

Normally multiple definitions aren't allowed; unless they are common
symbols.  In the later case a linker picks one arbitrarily.

-fno-common alters tentative definitions translation, resulting in
a more strict and conformant semantics, multiple definitions are no
longer allowed.

This change was motivated by the OSX linker not handling common symbols
in static libraries
(https://stackoverflow.com/questions/19398742/os-x-linker-unable-to-find-symbols-from-a-c-file-which-only-contains-variables)
dd595ff7
History
Name Last commit Last update