From owner-freebsd-current@FreeBSD.ORG Tue Jun 1 14:03:39 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D3EA1065674; Tue, 1 Jun 2010 14:03:39 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 4C63A8FC3C; Tue, 1 Jun 2010 14:03:39 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id o51E3dSt063602; Tue, 1 Jun 2010 07:03:39 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id o51E3c4X063601; Tue, 1 Jun 2010 07:03:38 -0700 (PDT) (envelope-from sgk) Date: Tue, 1 Jun 2010 07:03:38 -0700 From: Steve Kargl To: Alban Hertroys Message-ID: <20100601140338.GA63489@troutmask.apl.washington.edu> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <338E3C69-1542-4F0D-89C4-C96EA3575AEA@solfertje.student.utwente.nl> User-Agent: Mutt/1.4.2.3i Cc: Kostik Belousov , Roman Divacky , current@freebsd.org Subject: Re: [TESTING]: ClangBSD branch needs testing before the import to HEAD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 14:03:39 -0000 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