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: [RFH / Patch] PR 51222


Hi,

On 04/29/2012 05:17 AM, Jason Merrill wrote:
On 04/28/2012 07:12 AM, Paolo Carlini wrote:
isn't, but clearly can be instantiation dependent. Then, I guess the way
I'm proposing to handle this is by starting some sort of embryonic
instantiation_dependent_expression_p and using it only here, for now,
like the attached (which passes on x86_64-linux). What do you think?

I think that implementing it properly shouldn't be that much harder; the definition from the ABI is


An expression is instantiation-dependent if it is type-dependent or value-dependent, or it has a subexpression that is type-dependent or value-dependent.
Ok, yesterday didn't read it, sorry.
This might just be a matter of calling for_each_template_parm and returning 1 if we see any template parameter.
Good. Today I quickly tried something along these lines (see 'p' attachment) and got some fails:

FAIL: g++.dg/abi/mangle45.C scan-assembler _Z1fIiEvT_DtfL0p_E
FAIL: g++.dg/abi/mangle45.C scan-assembler _Z1gIiEvT_PFDtfL0p_EvE
FAIL: g++.dg/abi/mangle49.C scan-assembler _Z2f1I1SENDtfp_E4typeET_
FAIL: g++.dg/cpp0x/decltype21.C (test for excess errors)
FAIL: g++.dg/cpp0x/sfinae12.C (test for excess errors)
FAIL: g++.dg/cpp0x/sfinae17.C (test for excess errors)
FAIL: g++.dg/cpp0x/sfinae21.C (test for excess errors)
FAIL: g++.dg/cpp0x/sfinae28.C (test for excess errors)
FAIL: g++.dg/cpp0x/trailing1.C scan-assembler _Z1lIiEDtfp_ET_
FAIL: g++.dg/cpp0x/variadic121.C (test for excess errors)

I don't know if you believe it could be easily amended (*)...

Otherwise, I'm attaching something very close to the letter of the ABI, which passes as-is the testsuite. If you like, I could also exercise more this version of instantiation_dependent_expression_p by changing static_assert too to also use it.

Thanks,
Paolo.

(*) In case somebody is curious, include_nondeduced_p doesn't change anything.

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

Attachment: patch_51222_2
Description: Text document

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]