This is the mail archive of the
mailing list for the GCC project.
Re: [C++ Patch] PR 51312
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 07 Aug 2014 11:28:12 -0400
- Subject: Re: [C++ Patch] PR 51312
- Authentication-results: sourceware.org; auth=none
- References: <53E359BC dot 10008 at oracle dot com> <53E37E22 dot 8020002 at redhat dot com> <53E3861B dot 4050703 at oracle dot com>
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
And we should use the same code path for explicit and implicit values.