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: [RFC] PR 50837


On 11/10/2011 01:43 AM, Jason Merrill wrote:
On 11/09/2011 05:45 PM, Paolo Carlini wrote:
finish_id_expression is called from cp_parser_primary_expression with a
true allow_non_integral_constant_expression_p and the error doesn't
occur.

Yes, allow_non_integral_constant_expression_p should always be true in C++11.
Ah, good (sorry about the badly formatted code, by the way). Now, if I apply the patchlet below, I get this error for template/nontype13.C:

nontype13.C:14:5: error: could not convert template argument ‘((Dummy<int>*)this)->Dummy<T>::evil<int>’ to ‘bool’

compared to the current:

nontype13.C:14:5: error: ‘void Dummy<T>::evil() [with T = int]’ cannot appear in a constant-expression

Seems some sort of diagnostic quality regression...

By the way, before receiving your feedback, I was also wondering if the tsubst_expr calls for STATIC_ASSERT should really pass true as integral_constant_expression_p...

Paolo.

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

Attachment: p
Description: Text document


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