Compiling this program: #include <sys/types.h>
$ gcc a.c In file included from /usr/include/sys/types.h:219, from a.c:1: /pdv/.tools/pkg/gcc/4.3.0/bin/../lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed/sys/sysmacros.h:52: error: expected ',' or ';' before '{' token /pdv/.tools/pkg/gcc/4.3.0/bin/../lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed/sys/sysmacros.h:58: error: expected ',' or ';' before '{' token /pdv/.tools/pkg/gcc/4.3.0/bin/../lib/gcc/i686-pc-linux-gnu/4.3.0/include-fixed/sys/sysmacros.h:64: error: expected ',' or ';' before '{' token $ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /ws/jrichter/nfs/src/bld/cfg/build/tmp.evo4.19802/gcc-4.3.0/configure --prefix=/tools/pkg/gcc/4.3.0 --enable-languages=c,c++ --disable-threads --with-gmp=/tools/pkg/gmp/4.2.2 --with-mpfr=/tools/pkg/mpfr/2.3.1 Thread model: single gcc version 4.3.0 (GCC) $ uname -a Linux evo4 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686 i686 i386 GNU/Linux Here is the relevant part of diff -u /usr/include/sys/sysmacros.h .../include-fixed/sys/sysmacros.h # if defined __GNUC__ && __GNUC__ >= 2 -__extension__ extern __inline unsigned int -__NTH (gnu_dev_major (unsigned long long int __dev)) +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_major (unsigned long long int __dev) __THROW { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } Note that __THROW expands to __attribute__ ((__nothrow__)) when compiling in C. But it seems this attribute isn't allowed on function definitions. -- Summary: Fixincludes corrupts sysmacros.h Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg dot richter at pdv-fs dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36368