The following code (an example of code used in the linux kernel) gives a compiler error in 3.4.0. It works in 3.3.2. void a( int b, int c, int d ) __attribute__((regparm(3))) ; void a( int b, int c, int d ) { b = 2; } gcc -v t1.c -c Lese Spezifikationen von /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/specs Konfiguriert mit: ../gcc-3.4.0/configure --prefix=/usr --enable-threads=posix --with-cpu=athlon --with-tune=athlon --enable-languages=c,c++ Thread-Modell: posix gcc-Version 3.4.0 /usr/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1 -quiet -v t1.c -quiet -dumpbase t1.c -mtune=athlon -auxbase t1 -version -o /tmp/ccv32PVQ.s #include "..." - Suche beginnt hier: #include <...> - Suche beginnt hier: /usr/local/include /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/include /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include /usr/include Ende der Suchliste. GNU C version 3.4.0 (i686-pc-linux-gnu) compiled by GNU C version 3.4.0. GGC-Heuristik: --param ggc-min-expand=73 --param ggc-min-heapsize=80715 t1.c:4: Fehler: in Konflikt stehende Typen für »a« t1.c:1: Fehler: vorherige Deklaration von »a« war hier t1.c:4: Fehler: in Konflikt stehende Typen für »a« t1.c:1: Fehler: vorherige Deklaration von »a« war hier Compilation exited abnormally with code 1 at Sun Apr 25 17:12:59 If you change the code to the following, it works: void a( int b, int c, int d ) __attribute__((regparm(3))) ; void __attribute__((regparm(3))) a( int b, int c, int d ) { b = 2; }
This is a dup of bug of 15095. See <http://gcc.gnu.org/ml/gcc/2004-03/msg00039.html> for why this was changed. *** This bug has been marked as a duplicate of 15095 ***