public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65509] New: [C++11] GCC rejects operator== with two distinct pointers as not constexpr
@ 2015-03-22  9:55 kariya_mitsuru at hotmail dot com
  2015-03-22 10:38 ` [Bug c++/65509] " daniel.kruegler at googlemail dot com
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: kariya_mitsuru at hotmail dot com @ 2015-03-22  9:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65509

            Bug ID: 65509
           Summary: [C++11] GCC rejects operator== with two distinct
                    pointers as not constexpr
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kariya_mitsuru at hotmail dot com

Created attachment 35091
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35091&action=edit
g++ -v

The sample code below should be compiled successfully but gcc 5.0 rejects it.

================= sample code =================
constexpr int i1 = 1;
constexpr int i2 = 2;

constexpr auto b = &i1 == &i2;

int main() {}
================= sample code =================
cf. http://melpon.org/wandbox/permlink/1Ae9Blr93vcU9qKQ


Note that gcc 4.9.2 accepts it.

cf. http://melpon.org/wandbox/permlink/72exRtJrkijS9D8u


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

end of thread, other threads:[~2015-03-29 17:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22  9:55 [Bug c++/65509] New: [C++11] GCC rejects operator== with two distinct pointers as not constexpr kariya_mitsuru at hotmail dot com
2015-03-22 10:38 ` [Bug c++/65509] " daniel.kruegler at googlemail dot com
2015-03-22 12:55 ` mpolacek at gcc dot gnu.org
2015-03-25  8:54 ` [Bug c++/65509] [5 Regression] " mpolacek at gcc dot gnu.org
2015-03-25  9:04 ` jakub at gcc dot gnu.org
2015-03-25 10:07 ` jakub at gcc dot gnu.org
2015-03-25 11:45 ` jakub at gcc dot gnu.org
2015-03-25 12:42 ` daniel.kruegler at googlemail dot com
2015-03-25 14:44 ` mpolacek at gcc dot gnu.org
2015-03-25 15:07 ` mpolacek at gcc dot gnu.org
2015-03-25 15:35 ` jakub at gcc dot gnu.org
2015-03-25 15:39 ` mpolacek at gcc dot gnu.org
2015-03-27 16:37 ` jason at gcc dot gnu.org
2015-03-27 16:54 ` jason at gcc dot gnu.org
2015-03-27 16:54 ` jason at gcc dot gnu.org
2015-03-28 18:24 ` kariya_mitsuru at hotmail dot com
2015-03-28 18:31 ` kariya_mitsuru at hotmail dot com
2015-03-29 19:29 ` jason 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).