This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 08/07/2014 09:58 AM, Paolo Carlini wrote:
Also, I was thinking earlier today that conceptually the check pasted above should check cases different from the cases handled by perform_implicit_conversion_flags, thus, eg, *not* handle enum27.C, because it's an hard error, isn't our standard (and suppressible) narrowing diagnostic. Seems more correct to use it only to diagnose that the internally computed next enumerator overflows. See what I mean?
-Wno-narrowing should prevent an error on enum27; the narrowing conversion makes it not a converted constant expression, so the initializer is ill-formed. This probably needs some tweaking in the constexpr code.
And we should use the same code path for explicit and implicit values. Jason
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |