Sujet : Re: Compile time checking of standards conformance
De : polcott333 (at) *nospam* gmail.com (olcott)
Groupes : comp.lang.c comp.lang.c++Date : 23. May 2024, 15:18:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v2nj7h$1pm9a$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 5/23/2024 1:23 AM, Paavo Helde wrote:
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.
I would think that syntactically non-conforming code could be
flagged by the parser.
-- Copyright 2024 Olcott "Talent hits a target no one else can hit; Geniushits a target no one else can see." Arthur Schopenhauer