public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eric.niebler at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63438] New: conditional operator deducing lvalues incorrectly Date: Thu, 02 Oct 2014 06:42:00 -0000 [thread overview] Message-ID: <bug-63438-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63438 Bug ID: 63438 Summary: conditional operator deducing lvalues incorrectly Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com Target: i686-pc-cygwin Problem is with the following code: int i = 0; const int j = 0; static_assert(std::is_same<decltype(true? i : j), int const &>::value, ""); I expect the static_assert to pass. It doesn't. It does with clang. Compiled with -std=gnu++11. $ gcc -v Using built-in specs. COLLECT_GCC=/usr/local/gcc-4.9.0/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/gcc-4.9.0/libexec/gcc/i686-pc-cygwin/4.9.0/lto-wrapper.exe Target: i686-pc-cygwin Configured with: ../gcc-4.9.0/configure --prefix=/usr/local/gcc-4.9.0 --disable-bootstrap --enable-languages=c,c++ Thread model: single gcc version 4.9.0 (GCC)
next reply other threads:[~2014-10-02 6:42 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-02 6:42 eric.niebler at gmail dot com [this message] 2014-10-02 7:11 ` [Bug c++/63438] " pinskia at gcc dot gnu.org 2014-10-02 9:17 ` redi at gcc dot gnu.org 2014-10-02 9:37 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-63438-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).