Deutsch   English   Français   Italiano  
<ljp1kvFdbt2U1@mid.individual.net>

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

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!news.in-chemnitz.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Newsgroups: comp.arch
Subject: Re: Computer architects leaving Intel...
Date: Tue, 3 Sep 2024 21:08:31 +0300
Organization: Tidorum Ltd
Lines: 28
Message-ID: <ljp1kvFdbt2U1@mid.individual.net>
References: <2024Aug30.161204@mips.complang.tuwien.ac.at>
 <memo.20240830164247.19028y@jgd.cix.co.uk> <vasruo$id3b$1@dont-email.me>
 <2024Aug30.195831@mips.complang.tuwien.ac.at> <vat5ap$jthk$2@dont-email.me>
 <vaunhb$vckc$1@dont-email.me> <vautmu$vr5r$1@dont-email.me>
 <2024Aug31.170347@mips.complang.tuwien.ac.at> <vavpnh$13tj0$2@dont-email.me>
 <vb2hir$1ju7q$1@dont-email.me> <8lcadjhnlcj5se1hrmo232viiccjk5alu4@4ax.com>
 <vb3k0m$1rth7$1@dont-email.me>
 <17d615c6a9e70e9fabe1721c55cfa176@www.novabbs.org>
 <86v7zep35n.fsf@linuxsc.com> <20240902180903.000035ee@yahoo.com>
 <86r0a2otte.fsf@linuxsc.com> <vb50cm$2uttr$1@dont-email.me>
 <86ed61pfus.fsf@linuxsc.com> <vb68c2$3833i$1@dont-email.me>
 <vb6g9d$396lj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net o0Ln1ju21z2wCRGLI6rwrgPBeCpSwVWkXMq6XXdpfina5IZRZ4
Cancel-Lock: sha1:mec7wwXI5MpSDsySMFNKY9lLqqw= sha256:Ns9J2fbyN+um6B5BpozGyU7ZgFbPkO3kXStLfqnQ5p0=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <vb6g9d$396lj$1@dont-email.me>
Bytes: 2892

On 2024-09-03 11:10, David Brown wrote:

    [snip]

> (There are a few situations where UB in C could be diagnosed at 
> compile-time, which are probably historical decisions to avoid imposing 
> too much work on early compilers.  Where possible, UB that can be caught 
> at compile time, could usefully be turned into constrain violations that 
> must be diagnosed.)


The problem, as you of course know, is that the "can" in "can be caught 
at compile time" depends on the amount and kind of analysis that is done 
at compile time -- some cases of UB "can" be caught at compile time but 
only by advanced and costly analysis. If the language standard requires 
that such things /must/ be detected by the compiler, it can place quite 
a burden on the developers of conforming compilers.

As I understand it, current C compilers detect UB mostly as a side 
effect of the analyses they do for code optimization purposes, which 
vary widely between compilers, and so the UB-detections also vary.

This issue (compile-time detection) has now and then been discussed in 
the Ada standards group. Given the currently low market penetration of 
Ada, the group has been reluctant to require too much of the compilers, 
and so the more advanced UB-detecting tools are stand-alone, such as the 
SPARK tools.