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++ 4.6 Patch] allow uninitialized const or reference members with -fpermissive


2011/5/25 Jason Merrill <jason@redhat.com>:
> On 05/24/2011 04:40 PM, Fabien Chêne wrote:
>>
>> Indeed. I have also added two testcases to check sfinae on 'new T',
>> with and without -fpermissive, which leads to a different result.
>
> We don't want to do that; overload resolution should always produce the same
> result. ?We can only be permissive in non-SFINAE context.

Well, here is an updated patch. Testing in progress ... (it works for
the added testcases)
OK for 4.6 if it succeeds ?
OK to commit testcases pr25811-3.C and pr25811-4.C to Trunk ?

gcc/cp/ChangeLog:

2011-05-25  Fabien Chêne  <fabien@gcc.gnu.org>
       * init.c (diagnose_uninitialized_cst_or_ref_member_1): Use
       permerror instead of error, adjust the error count.

gcc/testsuite/ChangeLog:

2011-05-25  Fabien Chêne  <fabien@gcc.gnu.org>
       * g++.dg/init/pr25811-2.C: New.
       * g++.dg/init/pr25811-3.C: New.
       * g++.dg/init/pr25811-4.C: New.

-- 
Fabien

Attachment: perm_cst_ref_diag.patch
Description: Binary data


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