[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] GCC/GCL warning messages
From: |
Camm Maguire |
Subject: |
Re: [Axiom-developer] GCC/GCL warning messages |
Date: |
02 Mar 2007 17:04:59 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Gabriel Dos Reis <address@hidden> writes:
> address@hidden writes:
>
> | Camm,
> |
> | I'm building the next Axiom release. During the GCL build I see a large
> | number of messages that read:
> |
> | gcl_defmacro.c:In function `L12':
> | gcl_defmacro.c:79: warning: dereferencing type-punned pointer will
> | break strict-aliasing rules
> |
[ Note: Back from one month out of office ]
Thanks for the heads up. I cannot reproduce -- perhaps my gcc is out
of date -- will update to Debian unstable and retry.
> | C99 language semantics now assume that pointers to different types
> | point to different memory locations, which is obvious nonsense, but
> | part of the new standard.
>
> That statement is obviously untrue.
>
> The non-aliasing rule, which has always been there since I don't know
> when -- certainly, it is part of C89, and it is not a C99 invention --
> says that the following is undefined behaviour
>
> double z;
> *(long*)&z = 1;
> printf ("%g", z);
>
> That makes perfect sense. Why would you think it is nonsense?
>
> | You might want to add -fno-strict-aliasing option to the GCC command line.
>
> Instead of papering over the incorrectness, I would suggest to fix it.
>
Agreed.
Take care,
> -- Gaby
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- Re: [Axiom-developer] GCC/GCL warning messages,
Camm Maguire <=