summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-05 22:14:07 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-05 22:14:07 +0000
commit6e11a41e93e8b48b60e105f0eb5eb5790456401d (patch)
treef3582ba0288e61f8a5be8be41e75972d35b45ab3
parentf01922299b69b4a7fcccbe4d3ff34dd7ee2d6448 (diff)
downloadppe42-gcc-6e11a41e93e8b48b60e105f0eb5eb5790456401d.tar.gz
ppe42-gcc-6e11a41e93e8b48b60e105f0eb5eb5790456401d.zip
* c-typeck.c (common_type): push and pop binding level around
calling common_type on function parameters. * gcc.c-torture/compile/20010202-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39467 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-typeck.c5
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010202-1.c6
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 546dfc10ee9..8b01b13d877 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ * c-typeck.c (common_type): push and pop binding level around
+ calling common_type on function parameters.
+
Mon Feb 5 14:30:37 2001 Christopher Faylor <cgf@cygnus.com>
* config/i386/cygwin.h (CPP_SPEC): Add missing space after -idirafter.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 3b8f9b090cf..1ff44d21369 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -353,6 +353,9 @@ common_type (t1, t2)
/* If both args specify argument types, we must merge the two
lists, argument by argument. */
+ pushlevel (0);
+ declare_parm_level (1);
+
len = list_length (p1);
newargs = 0;
@@ -412,6 +415,8 @@ common_type (t1, t2)
parm_done: ;
}
+ poplevel (0, 0, 0);
+
t1 = build_function_type (valtype, newargs);
/* ... falls through ... */
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2cec5af4511..3ce1ec37058 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/compile/20010202-1.c: New test.
+
2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.abi/primary2.C: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010202-1.c b/gcc/testsuite/gcc.c-torture/compile/20010202-1.c
new file mode 100644
index 00000000000..e72586a3371
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20010202-1.c
@@ -0,0 +1,6 @@
+int foo (int n, char m[1][n]);
+
+int foo (int n, char m[1][n])
+{
+}
+
OpenPOWER on IntegriCloud