Not important, but maybe worth fixing sometime anyway: ------------------ namespace NS2 { using namespace NS1 __attribute__ ((strong)); } ------------------ g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc y.cc:3: error: expected namespace-name before "__attribute__" y.cc:3: error: `<type error>' is not a namespace y.cc:3: internal compiler error: tree check: expected namespace_decl, have error_mark in parse_using_directive, at cp/name-lookup.c:3409 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. W.
hmm, I do not know if I could call this a regression but .. Confirmed. And this patch fixes at this the first ICE (I do not know if another comes up): Index: name-lookup.c =============================================================== ==== RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.c,v retrieving revision 1.62 diff -u -d -b -w -u -p -r1.62 name-lookup.c --- name-lookup.c 26 Jun 2004 21:11:19 -0000 1.62 +++ name-lookup.c 1 Jul 2004 01:19:39 -0000 @@ -3432,7 +3432,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));
Assigned to Jason, as the inventor of "strong using".
Postponed all ice-on-invalid bugs to GCC 3.4.3.
Okay, my fix is only thing which is needed I will submit it then.
I posted the patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg01236.html>.
Subject: Bug 16301 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2004-10-15 14:30:31 Modified files: gcc/cp : name-lookup.c ChangeLog gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/lookup: strong-using-4.C Log message: 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu> PR c++/16301 * name-lookup.c (parse_using_directive): If we have a error_mark_node, do not set the decl namespace associations on it. 2004-10-14 Andrew Pinski <pinskia@physics.uc.edu> PR c++/16301 * g++.dg/lookup/strong-using-4.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.86&r2=1.87 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4434&r2=1.4435 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/strong-using-4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4455&r2=1.4456
I will apply the patch to 3.4 branch after some more testing. Fixed on the mainline.
Fixed.
Subject: Bug 16301 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: pinskia@gcc.gnu.org 2004-10-17 17:41:01 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog name-lookup.c Added files: gcc/testsuite/g++.dg/lookup: strong-using-4.C Log message: 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu> PR c++/16301 * namelookup.c (parse_using_directive): If we have a error_mark_node, do not set the decl namespace associations on it. 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu> PR c++/16301 * g++.dg/lookup/strong-using-4.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.291&r2=1.3389.2.292 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.170&r2=1.3892.2.171 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.17&r2=1.34.2.18 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/strong-using-4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1