public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63438] New: conditional operator deducing lvalues incorrectly
@ 2014-10-02  6:42 eric.niebler at gmail dot com
  2014-10-02  7:11 ` [Bug c++/63438] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eric.niebler at gmail dot com @ 2014-10-02  6:42 UTC (permalink / raw)
  To: gcc-bugs

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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-02  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02  6:42 [Bug c++/63438] New: conditional operator deducing lvalues incorrectly eric.niebler at gmail dot com
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

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).