From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.bugs Subject: Re: Compiling 1.7.0 with gcc-3.3 Date: Mon, 19 May 2003 09:20:45 -0700 Organization: Home Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3EC9045D.E8712F62@veritas.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053374370 26129 80.91.224.249 (19 May 2003 19:59:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 May 2003 19:59:30 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 19 21:59:29 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 19Hqmy-0006lW-00 for ; Mon, 19 May 2003 21:59:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19HpCr-0000PS-09 for guile-devel@m.gmane.org; Mon, 19 May 2003 14:17:53 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19Hp4r-0006wI-00 for guile-devel@gnu.org; Mon, 19 May 2003 14:09:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19HnTr-0005K5-00 for guile-devel@gnu.org; Mon, 19 May 2003 12:27:22 -0400 Original-Received: from bay-bridge.veritas.com ([143.127.3.10] helo=mtvmime01.veritas.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19HnFH-000282-00; Mon, 19 May 2003 12:12:15 -0400 Original-Received: from megami (unverified) by mtvmime01.veritas.com ; Mon, 19 May 2003 09:15:09 -0700 Original-Received: from veritas.com([172.22.12.211]) (3398 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Mon, 19 May 2003 09:12:13 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.19-4GB i686) X-Accept-Language: en Original-To: Mikael Djurfeldt Original-cc: bug-guile@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2415 gmane.lisp.guile.bugs:801 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:801 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: > 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. That being the case, delete the code. Do you really mean: (unsigned long)(some-value) > ((unsigned long)~0)>>1 ?? > I've tried to enclose the code causing the warning with a surrounding > conditional which tests the sizes of the data types, but the compiler > outputs the above warning even though the code isn't going to be > compiled. "isn't going to be compiled" or "would never get executed"? ``#if 0'' should effectively silence it. The preprocessor knows nothing of this stuff. Clearly, this code gets analyized before the dead code removal comes along. Maybe put the code under: #if SIZEOF_SCM_T_BITS > SIZEOF_LONG Can I get scm_c_eval_string_from_file_line() added, please? All other solutions have proven intractable. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel