http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50008

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-01-09
                 CC|                            |aldyh at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
I cannot reproduce this on either 4.8 or the 4.9 candidate (trunk).

reynosa:/dev/shm/trunk/gcc$ ./cc1 main.c foo.c -quiet
foo.c:1:6: error: conflicting types for 'foo'
 char foo[1][3];
      ^
main.c:1:13: note: previous declaration of 'foo' was here
 extern char foo[1][2];
             ^
reynosa:/dev/shm/trunk/gcc$ ./xgcc -B./ main.c foo.c -o a.out -flto
main.c:1:13: warning: type of 'foo' does not match original declaration
[enabled by default]
 extern char foo[1][2];
             ^
foo.c:1:6: note: previously declared here
 char foo[1][3];
      ^

For that matter, I can't even reproduce this on 4.7:

reynosa:/build/pristine-4_7/gcc$ cat make.mak
CC = ./xgcc -B./
CFLAGS = -flto

prog: foo.c main.c
        $(CC) $(CFLAGS) $^ -o $@
reynosa:/build/pristine-4_7/gcc$ make -f make.mak
./xgcc -B./ -flto foo.c main.c -o prog
In file included from foo.c:1:0,
                 from :0:
main.c:1:13: warning: type of 'foo' does not match original declaration
[enabled by default]
In file included from :0:0:
foo.c:1:6: note: previously declared here

Can we close this?

Reply via email to