This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49311] Missing static const symbol with -O0
- From: "hartmut.schirmer at arcormail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 7 Jun 2011 14:11:21 +0000
- Subject: [Bug c++/49311] Missing static const symbol with -O0
- Auto-submitted: auto-generated
- References: <bug-49311-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49311
--- Comment #1 from Hartmut Schirmer <hartmut.schirmer at arcormail dot de> 2011-06-07 14:11:17 UTC ---
Created attachment 24458
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24458
Small test case
Note bar() doesn't fail
Simple changes like
return direction==0 ? A::PEN+0 : A::NEN+0;
or
return direction==0 ? (unsigned)A::PEN : (unsigned)A::NEN;
cause the problem to go away