+2018-11-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl2.c (grokfield): Remove obsolete _vptr check; fix
+ explicit template argument list error location.
+
2018-11-16 Kamlesh Kumar <kamleshbhalui@gmail.com>
DR 1207
tree value;
const char *asmspec = 0;
int flags;
- tree name;
if (init
&& TREE_CODE (init) == TREE_LIST
if (value == void_type_node)
return value;
-
- name = DECL_NAME (value);
-
- if (name != NULL_TREE)
+ if (DECL_NAME (value)
+ && TREE_CODE (DECL_NAME (value)) == TEMPLATE_ID_EXPR)
{
- if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
- {
- error ("explicit template argument list not allowed");
- return error_mark_node;
- }
-
- if (IDENTIFIER_POINTER (name)[0] == '_'
- && id_equal (name, "_vptr"))
- error ("member %qD conflicts with virtual function table field name",
- value);
+ error_at (declarator->id_loc,
+ "explicit template argument list not allowed");
+ return error_mark_node;
}
/* Stash away type declarations. */