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

[Bug c++/32458] __attribute((section(".myname"))) is not working as expected in G++ but works ni GCC



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-06-21 20:34 -------
You forgot to mark the variables as being used.
You mark the variable used with the attribute used.
Once you do that, the variables are emitted.
This is not a bug but by design that GCC can optimize out unused variables,
even the ones marked with a different section.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32458


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