pgcc/pgCC feature request: predefine __PIC__ appropriately

Hi -

I’d like to request that the pgcc and pgCC preprocessors be upgraded to mimic the behavior of gcc/g++ when passed the -fPIC flag. Namely, automatically predefine the constant PIC=1 if and only if -fPIC is passed in a compilation, so that code (esp inline assembly in headers) can be conditionally compiled based on whether PIC is in use or not.

Thanks,
Dan

Hi Dan,

Thanks for the suggestion. I’ve added this as technical problem report (TPR) #4132.

  • Mat

Hi Dan,

Just an FYI. This has been added to the compiler in both the most current 7.0 release as well as the up coming 7.1 release.

  • Mat