pgcc -E -o main.i main.c doesn't work

Hi,

PGI 16.4 can’t write its preprocessing output into a file it seems. gcc, intel and clang support this.
It doesn’t report any warning or error to console. it just ignores it and prints to stdout.

$ pgcc -E -o main.i main.c

If you replace pgcc with pgc++ it works as intended.

Is this intended, or should I file a support request / bug?

Thanks for your help and best regards,
Ronny

-E output is sent to stdout.

redirect stdout to the file.

pgc* foo.c -E >& foo.i

should work.

dave

Yes it does, my question remains, though.

The proper switch to use is -P ‘stop after preprocessing’

pgcc -P -o hello.i hello.c
pgc++ -P -o main.i main.cpp

and btw,

pgc++ -E main.cpp >& main.i
pgcc -E main.c ->& main.i


also work.

Thanks for your help.