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 05/02/2012 01:46 AM, Jason Merrill wrote:
On 05/01/2012 07:39 PM, Paolo Carlini wrote:
I'm sorry, when a few days ago I noticed that we weren't tsubsting at all I thought the fix would be quite straightforward for me to handle because very local I didn't expect we would go ahead and resolve the FIXME about instantiation-dependent

No worries, thanks for sticking with it.


Maybe we want to gcc_assert ((check_types && !fn) || !check_types) at
the beginning of walk_template_parms. I don't know.

!check_types || !fn, sounds good.
Indeed ;)

+  if (pfd->check_types && !TYPE_P (t) && TREE_TYPE (t) == NULL_TREE)
+    return error_mark_node;

Let's add a comment like: if the type is null, this is a type-dependent expression, and if we're checking types, we would find the relevant template parameters. And fn must be null, so we can just return.
Ok. I'm attaching below the "state of the art".

I think we need to handle FIELD_DECL, too.
Are there hopes that handling FIELD_DECL like FUNCTION_DECL and VAR_DECL (besides the DECL_LANG_SPECIFIC check) would work? Ie;

    case FIELD_DECL:
      if (DECL_TEMPLATE_INFO (t)
&& walk_template_parms (DECL_TI_ARGS (t), fn, data,
                                  pfd->visited, pfd->check_types,
                                  pfd->include_nondeduced_p))
        return error_mark_node;

Unfortunately I don't see anything explicit about FIELD_DECL in the various dependent_p things, no hints.

Thanks,
Paolo.




Attachment: patch_51222_7
Description: Text document


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