public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/36368]  New: Fixincludes corrupts sysmacros.h
@ 2008-05-29 11:56 joerg dot richter at pdv-fs dot de
  2008-05-29 12:04 ` [Bug other/36368] " rguenth at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: joerg dot richter at pdv-fs dot de @ 2008-05-29 11:56 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <bug-36368-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-01-15  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-29 11:56 [Bug other/36368] New: Fixincludes corrupts sysmacros.h joerg dot richter at pdv-fs dot de
2008-05-29 12:04 ` [Bug other/36368] " rguenth at gcc dot gnu dot org
2008-05-29 12:22 ` joerg dot richter at pdv-fs dot de
2009-06-15 20:48 ` geir at cray dot com
     [not found] <bug-36368-4@http.gcc.gnu.org/bugzilla/>
2014-01-15  8:37 ` joerg.richter@pdv-fs.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).