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


On 05/01/2012 08:14 PM, Paolo Carlini wrote:
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?

I would think so.


A data point I can give you, I put a gcc_assert (TREE_CODE (t) != FIELD_DECL) in the default case of the walk_template_parms_r switch, and it never triggers for the whole testsuite.

With your patch, what happens if you have a member access like


template <class T>
struct A
{
  T t;
  auto f(A a) -> decltype (sizeof (a.t)) { }
};

I would expect that to hit the FIELD_DECL case.

Jason


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