NO

Author Topic: Something like _POCC_EXTENSIONS  (Read 3610 times)

aMarCruz

  • Guest
Something like _POCC_EXTENSIONS
« on: June 14, 2014, 09:52:11 PM »
Hi Pelle,

is there a preproc symbol to know if Pelles Extensions are in use?
ej: cc /Zx somefile.c

and any way to know current C standard used with /Ze option?
ej: cc /Ze /std=C11 somefile.c
vs cc /Ze /std=C99 somefile.c

maybe an __has_feature() builtin? ;-)
thanks.

aMarCruz

  • Guest
Re: Something like _POCC_EXTENSIONS
« Reply #1 on: June 15, 2014, 12:58:51 AM »
Found symbol to standard identification : __POCC_STDC_VERSION__
:)

neo313

  • Guest
Re: Something like _POCC_EXTENSIONS
« Reply #2 on: June 16, 2014, 11:19:22 AM »
You might want to check the menu: Help -> Contents. Unlike many other applications, Pelles has very detailed and useful help section, including descriptions of basically all c functions. It took me a while to figure that out due to previous bad experiences with the windows help.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Something like _POCC_EXTENSIONS
« Reply #3 on: June 22, 2014, 11:26:47 AM »
When the /Ze option is used (checked with _MSC_EXTENSIONS) all __STDC_* macros are not defined. I added __POCC_STDC_VERSION__ for internal use - which is always defined. It's currently undocumented, but I guess little will change about it in the future so I may as well document it.

I always assumed the few people using the extensions would know so anyway, but the /Zx option will get it's own symbol in RC5:
__POCC__EXTENSIONS=1
/Pelle

aMarCruz

  • Guest
Re: Something like _POCC_EXTENSIONS
« Reply #4 on: June 22, 2014, 07:47:54 PM »
Thanks !!
this will be great for generic include files.
:)