Re: Compile time checking of standards conformance

Liste des GroupesRevenir à l c 
Sujet : Re: Compile time checking of standards conformance
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c comp.lang.c++
Date : 24. May 2024, 00:32:06
Autres entêtes
Organisation : None to speak of
Message-ID : <87a5kg40t5.fsf@nosuchdomain.example.com>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Paavo Helde <eesnimi@osa.pri.ee> writes:
On 23.05.2024 02:44, olcott wrote:
Does enables conformance mean: Flags non conformance?
>
No. Enabling conformance means enabling support for the conforming features.
>
Flagging non-conformance is not possible in general as there are more
creative fools out there than there are compiler writers.
>
There are zillions of ways to write non-conforming code, for example
an endless loop is not conforming in C++. The compiler is not obliged
to diagnose it, but it is allowed for the compiler to silently
optimize the non-conforming code away, assuming it is never called. At
least that's what g++ folks think.

A conforming C compiler must produce a diagnostic for any violation of
any syntax rule or constraint.  Many C constructs (for example signed
integer overflow) have *undefined behavior*, which need not be
diagnosed.

C++ has similar rules.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
23 May 24 * Compile time checking of standards conformance11olcott
23 May 24 `* Re: Compile time checking of standards conformance10Paavo Helde
23 May 24  +- Re: Compile time checking of standards conformance1olcott
23 May 24  +* Re: Compile time checking of standards conformance4olcott
23 May 24  i`* Re: Compile time checking of standards conformance3David Brown
23 May 24  i `* Re: Compile time checking of standards conformance2olcott
23 May 24  i  `- Re: Compile time checking of standards conformance1David Brown
23 May 24  +* Re: Compile time checking of standards conformance3James Kuyper
24 May 24  i`* Re: Compile time checking of standards conformance2Paavo Helde
24 May 24  i `- Re: Compile time checking of standards conformance1James Kuyper
24 May 24  `- Re: Compile time checking of standards conformance1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal