This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

static Variables with Section Attribute


Hi all,

I have a question about using the section attribute for a variable. In
section 3.28 of Using Gcc, the manual says

"You may only use the section attribute with a fully initialized global
definition because of the way linkers work"

I understand that the linker requires that the object be defined only once
but I don't really see how this implies that the variable definition must be
both global and initialized. I am also looking for the command line argument
to enable the warning for this, it does not seem to be part of -Wall and I
can't find it in any documentation (probably because I don't know what it is
called).

TIA

Stan Katz

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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