This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

preprocessing problems


hello,

I have here some sparc-solaris7 machines, with the gcc 2.7.2.3. My users
are working with khoros and they get compiler errors whenever they
compile their projects. the error is everytime the same, it's:
/usr/include/sys/stat.h:164: parse error before `timestruc_t'
/usr/include/sys/stat.h:164: warning: no semicolon at end of struct or
union
/usr/include/sys/stat.h:165: warning: data definition has no type or
storage class
/usr/include/sys/stat.h:166: parse error before `st_ctim'
/usr/include/sys/stat.h:166: warning: data definition has no type or
storage class
/usr/include/sys/stat.h:171: parse error before `}'

so I wrote a little testprogram:
--
#include "sys/stat.h"

void main () {
    int a = 0;
}
--
I compiled it with the command:
gcc gcctest.c -o gcctest
and it works :-)
but if I use the following command:
gcc gcctest.c -I /usr/include/sys -o gcctest
it does not work, and I got the error from above
So I tried some include-paths (existing and non existing) and they work,
only the path above don't work. I wachted the preprocessor output and
the definition of timestruct_t was not in the preprocessor output by
using the second command line, but the rest was the same as by using the
first commandline.

I don't understand this behavior, can anyone explain it to me?

thanks
Manuel

wille@isip.mu-luebeck.de



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]