[Exim] Compiler warnings with GCC 3.3 (dereferencing type-pu…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Andreas Metzler
Date:  
À: exim-users
Sujet: [Exim] Compiler warnings with GCC 3.3 (dereferencing type-punned pointer will break strict-aliasingrules)
Hello,
It looks like Exim needs the -fno-strict-aliasing option, I get a
great mass of "dereferencing type-punned pointer will break
strict-aliasingrules" with Gcc 3.3.

I only did a _short_ google search and found this:
http://mail.gnu.org/archive/html/discuss-gnustep/2003-05/msg00423.html

| From: Frederic De Jaeger
| Subject: Re: dereferencing type-punned pointer will break strict-aliasingrules
| Date: 31 May 2003 12:52:32 +0200
| User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

|
| Nicola> Ok. I have added -fno-strict-aliasing to fix the short term
| Nicola> situation, but I suspect it might be a compiler bug, and in
| Nicola> the long term it would be much better to fix the compiler.

|
| It's not a compiler bug. It is a C99 bug, or more exactly, a
| feature. C99 changed the semantic of the C language with respect to
| aliasing questions. Now, the compiler can assume that pointer to
| different types points to different memory location. This breaks all
| the OO code written in C.

|
| This is a very good idea that the compiler issues a warning message
| because the semantic of language really changed and you want to revert
| to the old semantic.

|
| The make package MUST add -fno-strict-aliasing. It is not a
| convenience to get rid off warnings.


            cu andreas