-minstd: Require a minimum std version, without being specific

Alexander Monakov amonakov@ispras.ru
Wed Dec 21 19:12:18 GMT 2022


On Wed, 21 Dec 2022, Alejandro Colomar via Gcc wrote:

> > There's already a standard, portable way to check:
> > 
> > #if __STDC_VERSION__ < 201710
> > #error C17 required
> > #endif
> 
> Hmm, not my favourite to stick that in every public header file, but yes, it's
> portable.

I don't see why you'd need that in "every public header". Public headers
should be so simple they would have no need to check C version at all, no?

Alexander


More information about the Gcc mailing list