This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44673] static const variable works in if/else, fails at linking in ternary
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2010 23:08:20 -0000
- Subject: [Bug c++/44673] static const variable works in if/else, fails at linking in ternary
- References: <bug-44673-19370@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from redi at gcc dot gnu dot org 2010-06-25 23:08 -------
in this variation the result is not an lvalue, so you can get away without a
definition:
(b == 0) ? (int)VAR1 : VAR2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44673