c++: Remove a broken error-recovery path
Nathan Sidwell
nathan@acm.org
Tue Sep 22 19:31:30 GMT 2020
The remaining use of xref_tag_from_type was also suspicious. It turns
out to be an error path. At parse time we diagnose that a class
definition cannot appear, but we swallow the definition. This code
was attempting to push it into the global scope (or find a conflict).
This seems needless, just return error_mark_node. This was the
simpler fix than going through the parser and figuring out how to get
it to put in error_mark_node at the right point.
gcc/cp/
* cp-tree.h (xref_tag_from_type): Don't declare.
* decl.c (xref_tag_from_type): Delete.
* pt.c (lookup_template_class_1): Erroneously located class
definitions just give error_mark, don't try and inject it into the
namespace.
pushed to trunk
--
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdef-tpl.diff
Type: text/x-patch
Size: 2209 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200922/0ab6cd98/attachment.bin>
More information about the Gcc-patches
mailing list