-Os and ndispatch.c

Dag-ErlingSmørgrav des at des.no
Mon Mar 15 06:58:54 PST 2004


Harald Schmalzbauer <h at schmalzbauer.de> writes:
> Please forget the following lines if "CFLAGS= -Os -pipe" is known to
> be unsupported.

We only support -O1.  All other values are known to be broken in
various ways.  Parts of the kernel rely on dead code elimination to
avoid warnings; parts of userland play pointer games which the ISO C
standard does not permit; some inline asm code may be broken in ways
that only affect code compiled with -O2 or higher.

Note that -O2 and -O3 used to produce incorrect code in some cases,
but AFAIK these issues have all been fixed in gcc, and the remaining
bugs are in our own code.

> /usr/src/lib/libc/net/nsdispatch.c: In function `nss_configure':
> /usr/src/lib/libc/net/nsdispatch.c:344: warning: dereferencing type-punned pointer will break strict-aliasing rules
> [...]

I fixed those this morning.

> If I understand things right it should be part of Project Evil, so
> perhaps Bill Paul is interested in.

No.  It has nothing to do with Project Evil.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-current mailing list