aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-12-19 21:10:03 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-12-19 21:10:03 +0000
commit4656bc859d498ca67194d3bbc449ff916cf67f15 (patch)
tree5887830bfdea6db84f5280fdd26781ff05b8f0f6 /gcc
parent2dbd0234aa886bd84b12fae2f7e604aa99f092a5 (diff)
downloadgcc-4656bc859d498ca67194d3bbc449ff916cf67f15.zip
gcc-4656bc859d498ca67194d3bbc449ff916cf67f15.tar.gz
gcc-4656bc859d498ca67194d3bbc449ff916cf67f15.tar.bz2
re PR c++/12795 (ICE with attribute __alias__)
PR c++/12795 * name-lookup.c (pushdecl): Do not treated any functions as being "nested" in C++. PR c++/12795 * g++.dg/ext/attrib10.C: New test. From-SVN: r74849
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib10.C7
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6888140..19813dc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-19 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12795
+ * name-lookup.c (pushdecl): Do not treated any functions as being
+ "nested" in C++.
+
2003-12-19 Jason Merrill <jason@redhat.com>
PR c++/13371
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 43c02cf..97c4cbf 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -562,7 +562,7 @@ pushdecl (tree x)
if (current_function_decl && x != current_function_decl
/* A local declaration for a function doesn't constitute
nesting. */
- && !(TREE_CODE (x) == FUNCTION_DECL && !DECL_INITIAL (x))
+ && TREE_CODE (x) != FUNCTION_DECL
/* A local declaration for an `extern' variable is in the
scope of the current namespace, not the current
function. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 33e006e..dd13133 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-19 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/12795
+ * g++.dg/ext/attrib10.C: New test.
+
2003-12-19 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/cleanup-10.c: New test.
diff --git a/gcc/testsuite/g++.dg/ext/attrib10.C b/gcc/testsuite/g++.dg/ext/attrib10.C
new file mode 100644
index 0000000..6d04cb8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib10.C
@@ -0,0 +1,7 @@
+// PR c++/12795
+
+void foo()
+{
+ extern void bar () __attribute__ ((__alias__ ("BAR")));
+ bar ();
+}