Re: -Os and ndispatch.c

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Mon, 15 Mar 2004 15:58:31 +0100
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
Received on Mon Mar 15 2004 - 05:58:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC