|
From: | Paul Eggert |
Subject: | Re: [sr #111072] "[[]] attributes are a C23 extension warning" with clang |
Date: | Sat, 8 Jun 2024 13:59:01 -0700 |
User-agent: | Mozilla Thunderbird |
On 2024-06-08 13:31, Paul J. Lucas wrote:
It looks like -Wc23-extensions is the problem. If you stop using it (or if you also use -std=gnu23), you shouldn't get those warnings. At least, that's the behavior I see with clang 18.1.6 (a bit later than your clang) on Fedora.I’m not using that option. The options I am using are: ... -Wpedantic
-Wpedantic implies -Wc23-extensions, so omit -Wpedantic. Alternatively you can add -std=gnu23.
In practice -Wpedantic is more trouble than it's worth, and is best avoided. Adding -std=gnu23 can be a win, though, which is why the next Autoconf release is planned to default to that for C compilations.
[Prev in Thread] | Current Thread | [Next in Thread] |