OSDN Git Service

PR c/21342
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2005 12:38:34 +0000 (12:38 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 May 2005 12:38:34 +0000 (12:38 +0000)
commitfea849d3ae75cee1c377ecb89c6b0876e1fb601b
treebf0363a9abcdf9390c78c1340cf7f4002e86ccaf
parentfece76558f0e9adf2e176ac75bea7e1f1605e707
PR c/21342
* c-decl.c (pushdecl): When there is a declaration in the current
scope and the declarations are external linkage, check for
compatibility with the type in the external scope and update the
type in the external scope with the composite type information.
Do not form a composite type of the new type and the visible type
if they are incompatible.

testsuite:
* gcc.dg/redecl-11.c, gcc.dg/redecl-12.c, gcc.dg/redecl-13.c,
gcc.dg/redecl-14.c, gcc.dg/redecl-15.c: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99510 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/redecl-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/redecl-12.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/redecl-13.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/redecl-14.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/redecl-15.c [new file with mode: 0644]