From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.bugs Subject: Re: Intel icc finds too many errors in guile 1.8.8 to compile Date: Tue, 06 Oct 2009 22:06:29 +0100 Message-ID: <87ab04qlka.fsf@ossau.uklinux.net> References: <4A97A1E9.1000708@fz-juelich.de> <87my49bifn.fsf@ossau.uklinux.net> <878wfsu82e.fsf@gnu.org> <8763avzfh9.fsf@ossau.uklinux.net> <87r5tjbb0h.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254863221 6034 80.91.229.12 (6 Oct 2009 21:07:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2009 21:07:01 +0000 (UTC) Cc: bug-guile@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Oct 06 23:06:51 2009 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MvHF3-0001QQ-On for guile-bugs@m.gmane.org; Tue, 06 Oct 2009 23:06:42 +0200 Original-Received: from localhost ([127.0.0.1]:55608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvHF3-00033q-8A for guile-bugs@m.gmane.org; Tue, 06 Oct 2009 17:06:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvHEz-00032V-Ha for bug-guile@gnu.org; Tue, 06 Oct 2009 17:06:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvHEu-0002xc-HD for bug-guile@gnu.org; Tue, 06 Oct 2009 17:06:36 -0400 Original-Received: from [199.232.76.173] (port=35794 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvHEu-0002xZ-5b for bug-guile@gnu.org; Tue, 06 Oct 2009 17:06:32 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:41424) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvHEs-0007Oj-6i; Tue, 06 Oct 2009 17:06:30 -0400 Original-Received: from arudy (host86-145-159-48.range86-145.btcentralplus.com [86.145.159.48]) by mail3.uklinux.net (Postfix) with ESMTP id C1C781F6A06; Tue, 6 Oct 2009 22:06:29 +0100 (BST) Original-Received: from arudy (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 3B5B738021; Tue, 6 Oct 2009 22:06:29 +0100 (BST) In-Reply-To: <87r5tjbb0h.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Sun, 04 Oct 2009 14:26:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4342 Archived-At: ludo@gnu.org (Ludovic Court=E8s) writes: > I agree. Adding a named constant for 0 is one way to help the compiler > spot such mistakes. [...] > So these could become, say: > > enum scm_dynwind_flags > { > SCM_F_DYNWIND_NOT_REWINDABLE =3D 0, > SCM_F_DYNWIND_NOT_REWINDABLE > }; > > typedef enum scm_dynwind_flags scm_t_dynwind_flags; > > enum scm_wind_flags > { > SCM_F_WIND_NON_LOCAL_EXIT =3D 0, > SCM_F_WIND_EXPLICITLY > }; > > typedef enum scm_wind_flags scm_t_wind_flags; But wouldn't this approach break as soon as we added another flag, in the way that I described in my previous email? If the answer to that is yes, I think the reality is that bit flag combinations can't be made type-safe in C, and therefore we should stick with #defines. Regards, Neil