fcommon

Determines whether the compiler treats common symbols as global definitions.

IDE Equivalent

Windows: None

Linux: Data > Allow gprel Addressing of Common Data Variables

Mac OS X: Data > Allow gprel Addressing of Common Data Variables

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-fcommon

-fno-common

Windows:

None

Arguments

None

Default

-fcommon

The compiler does not treat common symbols as global definitions.

Description

This option determines whether the compiler treats common symbols as global definitions and to allocate memory for each symbol at compile time.

Option -fno-common tells the compiler to treat common symbols as global definitions. When using this option, you can only have a common variable declared in one module; otherwise, a link time error will occur for multiple defined symbols.

Normally, a file-scope declaration with no initializer and without the extern or static keyword "int i;" is represented as a common symbol. Such a symbol is treated as an external reference. However, if no other compilation unit has a global definition for the name, the linker allocates memory for it.

Alternate Options

None


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.