public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37405]  New: syntax error on __wur in include-fixed/sys/stat.h
@ 2008-09-07  0:20 sebor at roguewave dot com
  2008-09-07  0:27 ` [Bug other/37405] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sebor at roguewave dot com @ 2008-09-07  0:20 UTC (permalink / raw)
  To: gcc-bugs

Here's an odd error I just ran into. The source compiles fine as C but fails
with the C++ compiler.

$ cat t.C && cat /etc/redhat-release && gcc t.C || cat -n
/amd/devco/contrib/linux/gcc-4.3.1/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include-fixed/sys/stat.h
| head -n 350 | tail -n 10
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

int main () { }
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
In file included from /usr/include/fcntl.h:37,
                 from t.C:2:
/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include-fixed/sys/stat.h:345:
error: expected initializer before '__wur'
   341  #ifdef __USE_ATFILE
   342  /* Set file access permissions of FILE relative to
   343     the directory FD is open on.  */
   344  extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int
__flag)
   345       __THROW __nonnull ((2)) __wur;
   346  #endif /* Use ATFILE.  */
   347
   348
   349
   350  /* Set the file creation mask of the current process to MASK,


The output of gcc -v:

$ gcc -v t.C
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /nfs/devco/contrib/sources/gcc-4.3.1/configure
--prefix=//nfs/d
evco/contrib/linux/gcc-4.3.1 --disable-nls --enable-shared --enable-static
--wit
h-gmp=/nfs/devco/contrib/linux/gmp-4.2.2
--with-mpfr=/nfs/devco/contrib/linux/mp
fr-2.3.1 --enable-languages=c,c++
Thread model: posix
gcc version 4.3.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'

/amd/devco/contrib/linux/gcc-4.3.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/
4.3.1/cc1plus -quiet -v -iprefix
/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/g
cc/x86_64-unknown-linux-gnu/4.3.1/ -D_GNU_SOURCE t.C -quiet -dumpbase t.C
-mtune
=generic -auxbase t -version -o /tmp/ccC7bOXX.s
ignoring nonexistent directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gc
c/x86_64-unknown-linux-gnu/4.3.1/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/
../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1"
ignoring duplicate directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/
../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/x86_6
4-unknown-linux-gnu"
ignoring duplicate directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/
../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/backw
ard"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/
../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include"
ignoring duplicate directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/
../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include-fixed"
ignoring nonexistent directory
"/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gc
c/../../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../x86_64-unknown-linux-
gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.
1/../../../../include/c++/4.3.1

/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.
1/../../../../include/c++/4.3.1/x86_64-unknown-linux-gnu

/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.
1/../../../../include/c++/4.3.1/backward

/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.
1/include

/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.
1/include-fixed
 /amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/../../include
 /usr/include
End of search list.
GNU C++ (GCC) version 4.3.1 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
warning: GMP header version 4.2.2 differs from library version 4.1.4.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 189ba05b2677e2c6c2336d7bfe8ccc28
In file included from /usr/include/fcntl.h:37,
                 from t.C:2:
/amd/devco/contrib/linux/gcc-4.3.1/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1
/include-fixed/sys/stat.h:345: error: expected initializer before '__wur'


-- 
           Summary: syntax error on __wur in include-fixed/sys/stat.h
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug other/37405] syntax error on __wur in include-fixed/sys/stat.h
  2008-09-07  0:20 [Bug c++/37405] New: syntax error on __wur in include-fixed/sys/stat.h sebor at roguewave dot com
@ 2008-09-07  0:27 ` pinskia at gcc dot gnu dot org
  2009-01-04 22:37 ` sebor at roguewave dot com
  2009-01-04 23:29 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-07  0:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-09-07 00:25 -------
This works for me on the trunk on powerpc64-linux-gnu.  I think fix includes is
messing up the sys/stat.h for some reason. 


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |other
 GCC target triplet|                            |x86_64-unknown-linux-gnu


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug other/37405] syntax error on __wur in include-fixed/sys/stat.h
  2008-09-07  0:20 [Bug c++/37405] New: syntax error on __wur in include-fixed/sys/stat.h sebor at roguewave dot com
  2008-09-07  0:27 ` [Bug other/37405] " pinskia at gcc dot gnu dot org
@ 2009-01-04 22:37 ` sebor at roguewave dot com
  2009-01-04 23:29 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: sebor at roguewave dot com @ 2009-01-04 22:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sebor at roguewave dot com  2009-01-04 22:37 -------
Some additional background on the problem: it's likely that the gcc binary
used to reproduce the problem on Red Hat Enterprise Linux AS release 4 has
been configured and built on SUSE Linux Enterprise Server 10. Should this
be expected to work?


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug other/37405] syntax error on __wur in include-fixed/sys/stat.h
  2008-09-07  0:20 [Bug c++/37405] New: syntax error on __wur in include-fixed/sys/stat.h sebor at roguewave dot com
  2008-09-07  0:27 ` [Bug other/37405] " pinskia at gcc dot gnu dot org
  2009-01-04 22:37 ` sebor at roguewave dot com
@ 2009-01-04 23:29 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-04 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-01-04 23:29 -------
You certainly shouldn't move over fixincluded headers, either you need to rerun
fixinclude on the other system, or don't use any fixincluded headers.
Fixincluded headers are modified headers from the system where fixinclude was
run, so if you have different glibc headers between the system, it can't work
properly.
E.g. __wur is a macro that was introduced 2005-01-06, i.e. in glibc 2.4, while
RHEL4 has glibc 2.3.6.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-04 23:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-07  0:20 [Bug c++/37405] New: syntax error on __wur in include-fixed/sys/stat.h sebor at roguewave dot com
2008-09-07  0:27 ` [Bug other/37405] " pinskia at gcc dot gnu dot org
2009-01-04 22:37 ` sebor at roguewave dot com
2009-01-04 23:29 ` jakub at gcc dot gnu dot org

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).