Hi Alexander, On 12/21/22 20:12, Alexander Monakov wrote:
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 #endifHmm, 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?
For example, I'm currently writing a library that uses C99 inline. Compiling with GNU C89 inline would probably be very bad; if it works, I wouldn't trust that code. (okay, I know there's -fno-gnu89-inline; but I just want to be on the safe side, and disallow C89/GNUC89 entirely).
Cheers, Alex
Alexander
-- <http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature