Comparison of global addresses not constexpr; is this a GCC bug?
Enis BAYRAMOĞLU
enisbayramoglu@gmail.com
Fri Dec 16 07:44:00 GMT 2016
Hi, this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69681 still
appears to be UNCONFIRMED, and I'm really interested whether this is
actually a GCC bug or a valid behavior based on the C++ standard. Note
that clang has no problem treating the comparison of global addresses
as constexpr, so I've switched to using Clang while this bug isn't
fixed on GCC, since I really need this behavior. However, if this is
not considered to be a bug by the GCC developers and they will never
fix it, I'll try not to rely on it since I don't want to lose
compatibility with GCC forever.
Here's a link if you'd like to play with this on an online compiler:
https://godbolt.org/g/upGHrl
Thanks!
More information about the Gcc-help
mailing list