This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-fno-common


  According to the manual,

----------------------snip----------------------
`-fno-common'
     In C, allocate even uninitialized global variables in the data
     section of the object file, rather than generating them as common
     blocks.  
----------------------snip----------------------

  When I compile the following declaration:

----------------------snip----------------------
unsigned int operatingMode;
----------------------snip----------------------

at file-scope, with -fno-common, it actually gets allocated to the .bss
section.

  Is the manual wording just slightly vague here, and both .data and .bss
are regarded as covered by the phrase "the data section of the object file"?
Or should it actually have ended up in .data, not .bss after all?

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]