]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c/21342 (some incompatible external declarations not diagnosed)
authorJoseph Myers <joseph@codesourcery.com>
Tue, 10 May 2005 12:38:34 +0000 (13:38 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 10 May 2005 12:38:34 +0000 (13:38 +0100)
commit2798c11f46535b4581da39ed747dd07f02085ae5
treebf0363a9abcdf9390c78c1340cf7f4002e86ccaf
parent56d6849d895084a21f01d232f20fa6db9aecc971
re PR c/21342 (some incompatible external declarations not diagnosed)

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.

From-SVN: r99510
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]