Pelles C forum

Pelles C => Feature requests => Topic started by: aMarCruz on June 14, 2014, 09:52:11 pm

Title: Something like _POCC_EXTENSIONS
Post by: aMarCruz 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.
Title: Re: Something like _POCC_EXTENSIONS
Post by: aMarCruz on June 15, 2014, 12:58:51 am
Found symbol to standard identification : __POCC_STDC_VERSION__
:)
Title: Re: Something like _POCC_EXTENSIONS
Post by: neo313 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.
Title: Re: Something like _POCC_EXTENSIONS
Post by: Pelle 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
Title: Re: Something like _POCC_EXTENSIONS
Post by: aMarCruz on June 22, 2014, 07:47:54 pm
Thanks !!
this will be great for generic include files.
:)