[GCC-XML] stat and stat64 mystery

Bryan Ischo bji-gccxml at ischo.com
Thu Jul 5 01:26:56 EDT 2007

> What I really don't understand is, how the code being included by
> <sys/stat.h> can be defining structs stat and stat64 that do *not* have
> implicit typedefs so that the types can be referenced as simply "stat" and
> "stat64".

Hm, I think I may have realized what the cause is.  I am pretty sure that
"stat" and "stat64" are also function names as defined by the stat.h
header file.  I am guessing that because of this, the structs cannot be
implicitly typedef'd by C++ without interfering with the function names
"stat" and "stat64".  Or perhaps they are being implicitly typedef'd, but
because there are both types named 'stat'/'stat64' and functions named
'stat'/'stat64', any attempt to use these names results in ambiguity and
the compiler complains.


More information about the gccxml mailing list