From: Alejandro Colomar <alx.manpages@gmail.com>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: gcc@gcc.gnu.org, Andrew Clayton <andrew@digital-domain.net>
Subject: Re: -minstd: Require a minimum std version, without being specific
Date: Wed, 21 Dec 2022 20:15:07 +0100 [thread overview]
Message-ID: <db7c950d-01b0-0219-9008-e0559b8da3ba@gmail.com> (raw)
In-Reply-To: <87f51b6c-b2ea-e223-a96d-7ebf88e97fc7@ispras.ru>
[-- Attachment #1.1: Type: text/plain, Size: 893 bytes --]
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
>>> #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?
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/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-12-21 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 18:33 Alejandro Colomar
2022-12-21 18:51 ` Alexander Monakov
2022-12-21 18:53 ` Alejandro Colomar
2022-12-21 19:08 ` Alejandro Colomar
2022-12-21 19:14 ` Jonathan Wakely
2022-12-21 19:12 ` Alexander Monakov
2022-12-21 19:15 ` Alejandro Colomar [this message]
2022-12-22 2:42 ` Ben Boeckel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db7c950d-01b0-0219-9008-e0559b8da3ba@gmail.com \
--to=alx.manpages@gmail.com \
--cc=amonakov@ispras.ru \
--cc=andrew@digital-domain.net \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).