dereferencing type-punned pointer will break strict-aliasing
rules
Steve Kargl
sgk at troutmask.apl.washington.edu
Sun Jul 27 18:50:51 PDT 2003
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
More information about the freebsd-current
mailing list