+2018-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84843
+ * decl.c (duplicate_decls): For redefinition of built-in, use error
+ and return error_mark_node. For redeclaration, return error_mark_node
+ rather than olddecl if !flag_permissive.
+
2018-03-13 Jason Merrill <jason@redhat.com>
PR c++/82565 - ICE with concepts and generic lambda.
|| memcmp (name + len - strlen ("_chk"),
"_chk", strlen ("_chk") + 1) != 0))
{
+ if (DECL_INITIAL (newdecl))
+ {
+ error_at (DECL_SOURCE_LOCATION (newdecl),
+ "definition of %q#D ambiguates built-in "
+ "declaration %q#D", newdecl, olddecl);
+ return error_mark_node;
+ }
if (permerror (DECL_SOURCE_LOCATION (newdecl),
"new declaration %q#D ambiguates built-in"
" declaration %q#D", newdecl, olddecl)
&& flag_permissive)
inform (DECL_SOURCE_LOCATION (newdecl),
"ignoring the %q#D declaration", newdecl);
- return olddecl;
+ return flag_permissive ? olddecl : error_mark_node;
}
}
+2018-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84843
+ * g++.dg/ext/pr84843-1.C: New test.
+ * g++.dg/ext/pr84843-2.C: New test.
+
2018-03-13 David Pagan <dave.pagan@oracle.com>
PR c/46921