[Bug c++/84843] [8 Regression] C++ ICE on builtin redefinition since r258391

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 13 09:35:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84843

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
return newdecl is something we never do, we either return error_mark_node (an
error), or NULL_TREE (the olddecl and newdecl are different thing) or olddecl
(after merging the two decls).
One way out of this would be to change the permerror into just error and return
error_mark_node, or at least do that if DECL_INITIAL (newdecl) is non-NULL,
i.e. under -fpermissive allow and ignore redeclarations for builtins, but
always reject redefinitions.


More information about the Gcc-bugs mailing list