Re: dereferencing type-punned pointer will break strict-aliasing rules

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Sun, 27 Jul 2003 18:50:50 -0700
On Mon, Jul 28, 2003 at 10:35:22AM +0900, Jun Kuriyama wrote:
> At Mon, 28 Jul 2003 00:30:35 +0000 (UTC),
> kuriyama wrote:
> > Is this caused by -oS option?
> 
> Grrr, of course this should be s/-oS/-Os/.
> 
> These warnings are caused from DROP_GIANT() macro.  By tracking this
> down, actual source is __PCPU_GET() macro (line: 115) in
> sys/i386/include/pcpu.h.
> 
> 		__result = *(__pcpu_type(name) *)&__i;
> 

snip

> 
> What should we do?
> 

I presume you read share/example/make.conf, which states

# To compile just the kernel with special optimizations, you should use
# this instead of CFLAGS (which is not applicable to kernel builds anyway).
# There is very little to gain by using higher optimization levels, and doing
# so can cause problems.
#
#COPTFLAGS= -O -pipe

Notice the last 6 words.

-- 
Steve
Received on Sun Jul 27 2003 - 16:50:51 UTC

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