From: Jakub Jelinek Date: Mon, 5 Feb 2001 22:14:07 +0000 (+0100) Subject: c-typeck.c (common_type): push and pop binding level around calling common_type on... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f4e8f2b108db0a476093feeef1c8fd48afce03f;p=gcc.git c-typeck.c (common_type): push and pop binding level around calling common_type on function parameters. * 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. From-SVN: r39467 --- 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 + + * 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 * 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 + + * gcc.c-torture/compile/20010202-1.c: New test. + 2001-02-05 Nathan Sidwell * 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]) +{ +} +