This is the mail archive of the gcc-patches@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]

Re: PATCH: Don't allow weak variables in COMMON


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Thu, 23 May 2002 11:05:39 -0700
   
   If you tried something like:
   
     __attribute__((weak) int i;
   
   you got an assembler error telling you that you can't have weak
   symbols in common.

What about similar situations using __attribute__(section("foo"))?
Should we un-common the thing in those cases too?

I personally think it is a bug to mark something implicitly BSS then
tell the compiler "oh sorry, I didn't want it to be BSS actually".

Just un-BSS it by initializing it to zero if that is what you want.


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