* [C++ PATCH] Fix PR 16301, ICE with strong used
@ 2004-10-15 0:30 Andrew Pinski
2004-10-15 7:26 ` Jason Merrill
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pinski @ 2004-10-15 0:30 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
Another error recovery problem.
This patch has been in the bug for 3 months. The reason why I had not
submitted until today is because I forgot about the patch and I did not
fully test it when I added it to the bug report.
OK? Bootstrapped and tested on powerpc-darwin with no regressions.
Thanks,
Andrew Pinski
ChangeLog:
* namelookup.c (parse_using_directive): If we have a
error_mark_node, do not set the decl namespace associations
on it.
testsuite/ChangeLog:
* g++.dg/lookup/strong-using-4.C: New test.
[-- Attachment #2: temp.diff.txt --]
[-- Type: text/plain, Size: 1129 bytes --]
Index: cp/name-lookup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.c,v
retrieving revision 1.86
diff -u -p -r1.86 name-lookup.c
--- cp/name-lookup.c 5 Oct 2004 13:27:40 -0000 1.86
+++ cp/name-lookup.c 15 Oct 2004 00:22:21 -0000
@@ -3422,7 +3422,7 @@ parse_using_directive (tree namespace, t
{
if (!toplevel_bindings_p ())
error ("strong using only meaningful at namespace scope");
- else
+ else if (namespace != error_mark_node)
DECL_NAMESPACE_ASSOCIATIONS (namespace)
= tree_cons (current_namespace, 0,
DECL_NAMESPACE_ASSOCIATIONS (namespace));
Index: testsuite/g++.dg/lookup/strong-using-4.C
===================================================================
RCS file: testsuite/g++.dg/lookup/strong-using-4.C
diff -N testsuite/g++.dg/lookup/strong-using-4.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/g++.dg/lookup/strong-using-4.C 15 Oct 2004 00:22:21 -0000
@@ -0,0 +1,8 @@
+// PR c++/16301
+
+// { dg-do compile }
+
+namespace NS2
+{
+ using namespace NS1 __attribute__ ((strong)); // { dg-error "" }
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [C++ PATCH] Fix PR 16301, ICE with strong used
2004-10-15 0:30 [C++ PATCH] Fix PR 16301, ICE with strong used Andrew Pinski
@ 2004-10-15 7:26 ` Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2004-10-15 7:26 UTC (permalink / raw)
To: Andrew Pinski; +Cc: GCC Patches
OK.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-15 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15 0:30 [C++ PATCH] Fix PR 16301, ICE with strong used Andrew Pinski
2004-10-15 7:26 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).