GNU "cpp -P" portability

Tim Prince n8tm@aol.com
Sat Jun 8 17:19:00 GMT 2013


On 6/8/2013 12:56 PM, Thien-Thi Nguyen wrote:
> Is "cpp -P" POSIX?
>
> I poked around at
>
>   http://www.opengroup.org/onlinepubs/9699919799
>
> and could find only matches to "preprocessor" rather than "cpp" in the
> search facility, and so surmise "no", but thought i'd ask here anyway.
> I suppose a portable workaround would be:
>
>   cpp FILENAME | sed '/^#/d'
>
> but have fingers crossed nonetheless...
>
No, it's much the same as gcc -P, as far as I could tell by looking it 
up.   Why to to opengroup for something they didn't deal with?

-- 
Tim Prince



More information about the Gcc-help mailing list