Sujet : Re: Baby X is bor nagain
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 30. Jun 2024, 01:36:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240629172810.588@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-06-29, bart <
bc@freeuk.com> wrote:
You've perhaps missed my main point, which was that gcc 14 now reports
hard errors BY DEFAULT for things which I have argued in the past should
be hard errors by default.
I think you will not find disagreement about that here.
Situations which are constraint or syntax violations in ISO C, where the
compiler is not providing a useful extensions, should be diagnosed in
such a way that translation does not succeed.
ISO C doesn't require that, possibly because it would forbid extensions.
(Extensions that are non-conforming, but only in the regard that
translation doesn't fail.)
You've probably also missed my secondary point, which was asking WHY
that change was made, since all that people had to do to get that
behaviour was to jump through a number of hoops as I've always been told
to do. Apparently that was not good enough!
>
I've also learnt something interesting. Which is that whatever the
current version of gcc does is always right, and I'm always wrong if I
suggest it should be any different.
It's always been a poor decision in GCC to allow incompatible pointer
conversions without a cast, issuing only a diagnostic.
However, that is not wrong in the sense of not conforming to ISO C.
ISO C requires a diagnostic, not failed translation.
There are different senses of "wrong".
GCC also doesn't follow the ISO C dialect by default (no options given)
but its own dialect.
The requirements in ISO C are not sufficient to add up to good
engineering, though.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca