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]

Re: [C++ Patch] PR 61491 (aka DR 1206)


Hi,

On 07/09/2015 06:33 PM, Jason Merrill wrote:
On 07/09/2015 12:09 PM, Paolo Carlini wrote:
the DR got resolved in time for C++11 and Jonathan noticed that we
should remove the pedwarn, not a big deal. Tested x86_64-linux.

How about adding the testcase from the DR as well?  OK with that change.
Thanks. That revealed three interesting details. First, I suppose we want to use the testcase in the amended form appearing in C++11, thus with char as underlying type for the last two lines, instead of int (otherwise we reject both for the wrong reason, likewise all the other compilers I have at hand). That said, the following two lines of the testcase trigger another pedwarn, in the parser, about enumeration templates:

template<class T> enum A<T>::E : T { eT };
template<class T> enum class A<T>::S : T { sT };

Finally, we do *not* reject, as we should, the line:

template<> enum A<char>::E : char { echar };

Then, overall, is it Ok to simply suppress the pedwarn in C++11, and xfail for now the error? Should I open a new, separate bug report about the latter? (note that the issue, failing to reject an explicit specialization after instantiation, doesn't sound new to me and seems more general than enum-related issues...)

Thanks!
Paolo.

/////////////////////////





Attachment: patch_61491_2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]