From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: Re: Compiling 1.7.0 with gcc-3.3 Date: Thu, 22 May 2003 11:37:27 +0200 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: References: <3EC9045D.E8712F62@veritas.com> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053596508 18211 80.91.224.249 (22 May 2003 09:41:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 May 2003 09:41:48 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu May 22 11:41:45 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ImYe-0004g7-01 for ; Thu, 22 May 2003 11:40:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ImY9-0006xe-33 for guile-bugs@m.gmane.org; Thu, 22 May 2003 05:39:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19ImY2-0006ws-I7 for bug-guile@gnu.org; Thu, 22 May 2003 05:39:42 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19ImXW-0006pZ-EH for bug-guile@gnu.org; Thu, 22 May 2003 05:39:41 -0400 Original-Received: from kvast.blakulla.net ([213.212.20.77]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ImXV-0006pO-SS; Thu, 22 May 2003 05:39:10 -0400 Original-Received: from dyna224-228.nada.kth.se ([130.237.224.228] helo=witch ident=mail) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 19ImW9-0007zz-00; Thu, 22 May 2003 11:37:45 +0200 Original-Received: from mdj by witch with local (Exim 3.35 #1 (Debian)) id 19ImVr-0007JU-00; Thu, 22 May 2003 11:37:27 +0200 Original-To: Bruce Korb In-Reply-To: <3EC9045D.E8712F62@veritas.com> (Bruce Korb's message of "Mon, 19 May 2003 09:20:45 -0700") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Original-cc: djurfeldt@nada.kth.se Original-cc: bug-guile@gnu.org X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:807 gmane.lisp.guile.devel:2423 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:807 Bruce Korb writes: > Mikael Djurfeldt wrote: >> >> I've tried to compile CVS HEAD (1.7.0) with gcc-3.3. >> >> Of course, I'd like this to work with the default >> --enable-error-on-warning. However, there are two problematic >> instances. One is the use of SCM_STACKITEM. For example: >> >> eval.c:1965: >> if (scm_stack_checking_enabled_p >> && SCM_STACK_OVERFLOW_P ((SCM_STACKITEM *) &proc)) >> >> The cast into (SCM_STACKITEM *) causes a warning that the pointer can >> cause errors due to aliasing optimizations if it is dereferenced >> (which it isn't, BTW). -fstrict-aliasing is turned on by -O2 in >> gcc-3.3. > > Cast it through a void* cast: Done. Thanks. >> eval.c:1965: >> if (scm_stack_checking_enabled_p >> && SCM_STACK_OVERFLOW_P ((SCM_STACKITEM *) (void*) &proc)) > >> Another problem seems more difficult: >> >> gcc -DHAVE_CONFIG_H -I. -I../../../guile-core-new/libguile -I.. -I.. -I../../../guile-core-new -I../../../guile-core-new/libguile-ltdl -g -O2 -Werror -Wall -Wmissing-prototypes -Wno-strict-aliasing -MT numbers.lo -MD -MP -MF .deps/numbers.Tpo -c ../../../guile-core-new/libguile/numbers.c -fPIC -DPIC -o .libs/numbers.lo >> In file included from ../../../guile-core-new/libguile/numbers.c:4084: >> ../../../guile-core-new/libguile/num2integral.i.c: In function `scm_num2long_long': >> ../../../guile-core-new/libguile/num2integral.i.c:65: warning: comparison is always false due to limited range of data type >> In file included from ../../../guile-core-new/libguile/numbers.c:4092: >> ../../../guile-core-new/libguile/num2integral.i.c: In function `scm_num2ulong_long': >> ../../../guile-core-new/libguile/num2integral.i.c:65: warning: comparison is always false due to limited range of data type >> >> I think this is a stupid warning message. In any case, you'd want to >> be able to shut it off. I can't find any way to do that. Maybe we >> should talk to the gcc people about this? > > Well, your test is: (unsigned long)(some-value) > (unsigned long)~0 > and it cannot ever be true. Well, it's really if (((scm_t_bits) n) > UNSIGNED_ITYPE_MAX) scm_out_of_range (s_caller, num); where UNSIGNED_ITYPE_MAX is different depending on which instance of num2intergral.i.c is compiled (the file is included into numbers.c several times, with different values of the C macros). It's true that the conditional cannot ever be true when UNSIGNED_ITYPE_MAX is (unsigned long)~0. What I meant with "stupid warning message" (which is a too strong wording) is that I want to be free to write conditionals which never will be true. In that case, I want the compiler to silently exclude the piece of dead code. On the other hand, other users might regard this condition as a sign of error and want the warning message. Ideally, one should then be able to customize whether to get the warning or not. In our case, we will now probably need to resort to preprocessor conditionals, which means less power and the need to add extra information in the form of new C preprocessor macros. > Can I get scm_c_eval_string_from_file_line() added, please? > All other solutions have proven intractable. Hmm... I guess I will find a reference to your problem in some other thread. Will go looking later. Anyway, thanks for your input! Best regards, Mikael _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile