[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C Strings and String Literals.
From: |
Alejandro Colomar |
Subject: |
Re: C Strings and String Literals. |
Date: |
Tue, 15 Nov 2022 21:04:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 |
Hi Ralph,
On 11/15/22 14:48, Alejandro Colomar wrote:
Here's a compiler which has been told I want C11.
You told it you want C11.
$ gcc -std=c11 -c str.c
But you didn't tell it to warn about non-conforming code.
Moreover, you asked it to warn about things that may or may not have anything to
do with ISO C11.
My mistake, for some reason I misread and thought you had used -Wall. Sorry.
However, you still need -Wpedantic -pedantic-warnings, as explained above. GCC
is non-conforming unless you ask it explicitly to be a conforming compiler, and
even then...
[
-Wall
This enables all the warnings about constructions
that some users consider questionable, and that are
easy to avoid (or modify to prevent the warning),
even in conjunction with macros. This also enables
some language‐specific warnings described in C++
Dialect Options and Objective‐C and Objective-C++
Dialect Options.
]
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature
- Re: Pascal rides again (was: Specifying dependencies more clearly), (continued)
- C Strings and String Literals. (Was: Pascal rides again), Ralph Corderoy, 2022/11/13
- Re: C Strings and String Literals. (Was: Pascal rides again), Larry McVoy, 2022/11/13
- Re: C Strings and String Literals. (Was: Pascal rides again), Alejandro Colomar, 2022/11/13
- Re: C Strings and String Literals. (Was: Pascal rides again), Alejandro Colomar, 2022/11/13
- Re: C Strings and String Literals. (Was: Pascal rides again), Larry McVoy, 2022/11/13
- Re: C Strings and String Literals. (Was: Pascal rides again), Alejandro Colomar, 2022/11/13
- Re: C Strings and String Literals., Ralph Corderoy, 2022/11/14
- Re: C Strings and String Literals., Alejandro Colomar, 2022/11/15
- Re: C Strings and String Literals.,
Alejandro Colomar <=