Re: [TESTING]: ClangBSD branch needs testing before the import to HEAD

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Tue, 1 Jun 2010 07:03:38 -0700
On Tue, Jun 01, 2010 at 12:18:41PM +0200, Alban Hertroys wrote:
> 
> Compiler bugs in gcc are probably just as hard to find as
> compiler bugs in clang, but if you have multiple compilers
> at your disposal you can determine that you're probably
> looking at a compiler bug instead of a FreeBSD bug. 
> 
> Especially once there are users running the same code compiled
> with gcc and with clang it should be /easier/ to determine
> whether it's a compiler bug or not. Seeing a "Y doesn't work
> for me compiled with clang" vs. "Y works for me compiled with
> gcc" or vice versa would mean that the problem is likely in
> one of the compilers.
> 

Apparently, you've never read a programming language
standard document.   You could run into the above 
situation where both compilers are behaving correctly.
Most language standards contain language of the form
"processor dependent behavior" or "implementation
defined behavior".

Here's an example from a draft of the C standard (n1256.pdf).

3.4.1

implementation-defined behavior
unspecified behavior where each implementation documents how the
choice is made

EXAMPLE: An example of implementation-defined behavior is the
propagation of the high-order bit when a signed integer is
shifted right.

-- 
Steve
Received on Tue Jun 01 2010 - 12:03:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC