discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strict aliasing in gcc33


From: Andrew Pinski
Subject: Re: strict aliasing in gcc33
Date: Thu, 29 Apr 2004 14:41:18 -0400


On Apr 29, 2004, at 10:50, Pete French wrote:


This isnt really GNustep,its more of an objective C question, but I am
not sure where else to ask...

I am moving  from gcc2.95 to gcc3.3 which I find is that if I compile
any code with -O2 enabled then I get the following warning when I invoke a
method:

bash-2.05b$ gcc33 -c -Wall -O2 stest.m
stest.m: In function `main':
stest.m:29: warning: dereferencing type-punned pointer will break strict-aliasing rules

I have completely failed to find any way to code the file such that it does not produce this warning. Obviously II can add the '-fno-strict-aliasiing' to
the cmmand line, but I do not belive that al Objectoive C needs this to
compile without warning! Surely not!

The piece of test code in question looks like this: (the error is
on the '[TestObject new]' line)

Yes this is a semi known bug in the Objective-C front-end (I had forgot to
file a bug report for it though).

Thanks,
Andrew Pinski
libobjc maintainer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]