[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-08-07 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 Paolo Carlini changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-08-07 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #13 from paolo at gcc dot gnu.org --- Author: paolo Date: Thu Aug 7 19:51:28 2014 New Revision: 213736 URL: https://gcc.gnu.org/viewcvs?rev=213736&root=gcc&view=rev Log: /cp 2014-08-07 Paolo Carlini PR c++/51312 * decl.c

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-08-06 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #12 from Paolo Carlini --- build_expr_type_conversion is the answer

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-08-06 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #11 from Paolo Carlini --- I'm having a look at the issue and it seems rather different than I (we) thought. Suffices to say that it does not affect constexpr non-operator member functions, and that sort-of explains this (ugly) workar

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-07-31 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 Paolo Carlini changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-07-22 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #9 from Marc Glisse --- (In reply to Paolo Carlini from comment #6) > Marc, are you going to send your patch to the mailing list (CC Jason)? Sorry, I don't remember this patch at all. I may try again to understand what it does at som

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-07-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #8 from Paolo Carlini --- ... but then value isn't yet an INTEGER_CST and we can't use int_fits_type_p... Still, something seems redundant between an early conversion and the final convert.

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-07-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #7 from Paolo Carlini --- Uhm, it occurs to me that we may also play with moving up the code we already have a few line below handling ENUM_UNDERLYING_TYPE (enumtype): if convert is called first on the X() in e = X() we get a CALL_EXP

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2014-07-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #6 from Paolo Carlini --- Marc, are you going to send your patch to the mailing list (CC Jason)? I note that current clang too for enum_base.C issues the narrowing diagnostic: as-is patch seems already pretty good to me.

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2012-04-29 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 --- Comment #5 from Marc Glisse 2012-04-29 14:12:12 UTC --- Created attachment 27261 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27261 build_enumerator patch Changes the behavior on g++.dg/cpp0x/enum_base.C from an error to a warning in

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2012-02-08 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 Andrew Pinski changed: What|Removed |Added Depends on||27403 --- Comment #4 from Andrew Pinski

[Bug c++/51312] [C++0x] Wrong interpretation of converted constant expressions (for enumerator initializers)

2012-01-30 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51312 Andrew Pinski changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIR