Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2010 07:03:38 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Alban Hertroys <dalroi@solfertje.student.utwente.nl>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Roman Divacky <rdivacky@freebsd.org>, current@freebsd.org
Subject:   Re: [TESTING]: ClangBSD branch needs testing before the import to HEAD
Message-ID:  <20100601140338.GA63489@troutmask.apl.washington.edu>
In-Reply-To: <338E3C69-1542-4F0D-89C4-C96EA3575AEA@solfertje.student.utwente.nl>
References:  <20100529130240.GA99732@freebsd.org> <20100530135859.GI83316@deviant.kiev.zoral.com.ua> <508DA8CE-749A-46B4-AF0B-392DB08CBBCD@samsco.org> <20100531095617.GR83316@deviant.kiev.zoral.com.ua> <338E3C69-1542-4F0D-89C4-C96EA3575AEA@solfertje.student.utwente.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100601140338.GA63489>