chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] GCC, dereferencing type-punned pointer...


From: felix
Subject: Re: [Chicken-users] GCC, dereferencing type-punned pointer...
Date: Sun, 07 Sep 2003 09:24:41 +0200
User-agent: Opera7.11/Linux M2 build 406

On Fri, 05 Sep 2003 23:49:40 +0200, Johannes Groedem <address@hidden> wrote:

Hi,

I'm getting hundreds (thousands?) of these warnings from GCC (3.3.2
20030831 (Debian prerelease)):

warning: dereferencing type-punned pointer will break
strict-aliasing rules

I'm just wondering whether I can safely ignore them, or whether they
are significant.  This is an x86-target, by the way.

CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-uninitialized
-DHAVE_ALLOCA_H -fstrict-aliasing

make test passes, and it appears to work fine.


You can patch configure.in the following way:

--- configure.in2003-08-30 18:10:34.000000000 +0200
+++ xxx2003-09-07 09:20:44.000000000 +0200
@@ -140,7 +140,7 @@
case "$CC" in
  *gcc*)
  if test "-g -O2" = "$CFLAGS"; then
-    CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-uninitialized"
+ CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-uninitialized - Wno-strict-aliasing"
    if test -n "$HAVE_ALLOCA_H"; then
      CFLAGS="$CFLAGS -DHAVE_ALLOCA_H"
    fi

AFAIK -fstrict-aliasing works fine with the code generated by chicken.


cheers,
felix





reply via email to

[Prev in Thread] Current Thread [Next in Thread]