----- "Scott Beardsley" <sc...@cse.ucdavis.edu> wrote:

> #include<stddef.h>
> int main ()
> {
> struct foo {int a, b;}; size_t offset = offsetof(struct foo, b);
>   return 0;
> }
> 
> $ pgcc conftest.c
> PGC-S-0037-Syntax error: Recovery attempted by deleting keyword
> struct
> (conftest.c: 4)
> PGC-S-0039-Use of undeclared variable foo (conftest.c: 4)
> PGC-S-0039-Use of undeclared variable b (conftest.c: 4)
> PGC/x86-64 Linux 10.0-0: compilation completed with severe errors
> $
> 
> pgcc v9 and gcc seem to have no problem with that code.
> 

pgcc v9 has problem to compile the above test program:

/pgi-9.0-4/linux86-64/9.0-4/bin/pgcc -c ts_offsetof.c
PGC-S-0037-Syntax error: Recovery attempted by deleting keyword struct 
(ts_offsetof.c: 4)
PGC-S-0039-Use of undeclared variable foo (ts_offsetof.c: 4)
PGC-S-0039-Use of undeclared variable b (ts_offsetof.c: 4)
PGC/x86-64 Linux 9.0-4: compilation completed with severe errors

A.Chan



Reply via email to