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
This commit is contained in:
Jakub Jelinek 2001-02-05 23:14:07 +01:00 committed by Jakub Jelinek
parent 58f60b5c91
commit 2f4e8f2b10
4 changed files with 20 additions and 0 deletions

View File

@ -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.

View File

@ -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 ... */
}

View File

@ -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.

View File

@ -0,0 +1,6 @@
int foo (int n, char m[1][n]);
int foo (int n, char m[1][n])
{
}