On 11/21/18 7:03 PM, Paolo Carlini wrote:
... in fact I'm thinking that the below - which directly checks for unqualified_id to be non-null in both places - may be a better variant: among other things it means that for related testcases like:
typedef void a();
struct A
{ a a1: 1; };
we get the location of a1 right (we could also change the diagnostics in grokbitfield to use DECL_SOURCE_LOCATION and exploit it), and the testsuite doesn't need adjustments. Tested x86_64-linux.

-       else if (TREE_CODE (type) == FUNCTION_TYPE
-                || TREE_CODE (type) == METHOD_TYPE)
+       else if (FUNC_OR_METHOD_TYPE_P (type) && unqualified_id)

Maybe change this to

else if (funcdecl_p)

?

OK either way.

Jason

Reply via email to