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;
To test this with simplified code:
-----
% cat test.c
struct T {
int a;
};
void
test()
{
struct T* c;
int __i = 0;
c = *(struct T* *)&__i;
}
% cc -c -Os -Wall test.c
test.c: In function `test':
test.c:11: warning: dereferencing type-punned pointer will break strict-aliasing rules
-----
__PCPU_GET() macro seems to be harmless if -Os is not used or
__pcpu_type() returns actual type rather than pointer.
What should we do?
--
Jun Kuriyama <[EMAIL PROTECTED]> // IMG SRC, Inc.
<[EMAIL PROTECTED]> // FreeBSD Project
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"