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/28/2012 05:24 AM, Jason Merrill wrote:
On 04/27/2012 09:42 PM, Paolo Carlini wrote:
In particular about the exact meaning of the FIXME? More generally, is
the issue here matter of compile-time optimization? Like we want to save
work when we actually *know* the type even in template context? (then
looks like type_dependent_expression_p isn't really what we want...)
It's more of a mangling issue. If the type is instantiation-dependent, we should mangle it as written; if not, we mangle the real type. Currently we don't test for instantiation-dependence, so we get this wrong; your change would go too far in the other direction.
Thanks for the clarification, essentially I was completely missing the concept of "instantiation-dependent", so far isn't used much, besides a block in pt.c (which I noticed just now).

In the specific case here at issue we have problems with DELETE_EXPR (either naked or wrapped in COMPOUND_EXPR) with NEW_EXPR as op0: the whole expression isn't type_dependent because DELETE_EXPR immediately 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?

Thanks,
Paolo.

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

Attachment: patch_51222_draft
Description: Text document


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