On Thu, Jul 24, 2003 at 02:46:49PM +0200, Sheldon Hearn wrote:
> On (2003/07/24 13:25), Andreas Metzler wrote:
> > 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 get no such warnings compiling Exim with gcc-3.3.1 as distributed in
> FreeBSD 5.1-CURRENT.
> $ gcc --version
> gcc (GCC) 3.3.1 [FreeBSD] 20030711 (prerelease)
> The FreeBSD port builds with no clever gcc options.
> My compiler invocations look like this:
> gcc -c -O -pipe -march=pentium3 -march=pentium3 \
> -I. -I/usr/local/include search.c
> What do yours look like?
It has -Wall in it.
For example like this:
| gcc -o em_init.o -c -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
| -O2 -I. -I../exim_monitor -I/usr/X11R6/include \
| ../exim_monitor/`echo em_init.o | sed 's/o$/c/'`
| ../exim_monitor/em_init.c: In function `decode_stripchart_config':
| ../exim_monitor/em_init.c:74: warning: dereferencing type-punned
| pointer will break strict-aliasing rules
| ../exim_monitor/em_init.c: In function `init':
| ../exim_monitor/em_init.c:234: warning: dereferencing
| type-punned pointer will break strict-aliasing rules
or this
| make[3]: Entering directory `/tmp/exim4-4.20/build-Linux-i386/lookups'
| [...]
| gcc -c -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 nis.c
| nis.c: In function `nis_find':
| nis.c:64: warning: dereferencing type-punned pointer will break strict-aliasing rules
| nis.c: In function `nis0_find':
| nis.c:89: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc --version
gcc (GCC) 3.3.1 20030722 (Debian prerelease)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See a complete buildlogs on http://buildd.debian.org/build.php?pkg=exim4
cu andreas