Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v59595$ban8$3@dont-email.me>
Deutsch   English   Français   Italiano  
<v59595$ban8$3@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c,comp.lang.c++
Subject: Re: Can you please verify that the analysis of these C functions is
 correct?
Date: Sun, 23 Jun 2024 14:43:17 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <v59595$ban8$3@dont-email.me>
References: <v4obkj$f9p5$2@dont-email.me>
 <v4pg5p$morv$1@raubtier-asyl.eternal-september.org>
 <v54s1p$3boc5$1@dont-email.me> <v5684p$3n50u$1@dont-email.me>
 <v56gs1$3olbi$3@dont-email.me> <v56lar$onl4$7@i2pn2.org>
 <v56uij$3rako$1@dont-email.me>
 <v573d1$3s8q3$1@raubtier-asyl.eternal-september.org>
 <v5780h$3t1bd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 23 Jun 2024 14:43:18 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5355e1e2ebba64f698c289003534b1d6";
	logging-data="371432"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+uMbeweAtZT3wEp2noAvsKHcsREJTcNlI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:kTvdCfNlGfxFviB7vemnjXigkyk=
In-Reply-To: <v5780h$3t1bd$1@dont-email.me>
Content-Language: en-GB
Bytes: 2950

On 22/06/2024 21:17, Chris M. Thomasson wrote:
> On 6/22/2024 10:58 AM, Bonita Montero wrote:
>> Am 22.06.2024 um 18:36 schrieb olcott:
>>
>>> It seems pretty stupid to allow gaps in the semantics of C++ 
>>> programs. Simply specify that the order of evaluation is left to 
>>> right unless:
>>> (a) Otherwise specified such as operator precedence rules.
>>> (b) Derives the same result as left to right ordering.
>>
>> Most UB is there to allow optimizations, also in this case.
>> I've got no problem with that.
>>
>>
> 
> Humm. Sounds reasonable. UB is there to be defined by a non-conforming 
> compiler? ;^)

No, UB is there so that /conforming/ compilers don't have to implement 
any specific behaviour for it, and can optimise assuming that either it 
doesn't happen, or that you don't care about the results if it does happen.

It is also useful for static analysis and debugging and tools like 
sanitizers - since UB is typically the result of something you don't 
want to happen in your code, like overflows, debugging tools can add 
extra code to tell you of such events.  If overflow behaviour had been 
defined, it would be normal and expected behaviour, and debugging tools 
can't freely change that.

Compilers - conforming or not - are always free to pick a definition for 
something that the standard says is undefined behaviour (either 
explicitly, or by simply omitting a definition for the behaviour).  If 
they document this definition, you can view it as an extension and rely 
on its use - if they don't document it, you rely on it at your own risk.