This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/39753] [4.3/4.4/4.5/4.6/4.7 Regression] Objective-C(++) and C90 strict-aliasing interaction bug
- From: "nicola at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Mar 2011 00:23:04 +0000
- Subject: [Bug objc/39753] [4.3/4.4/4.5/4.6/4.7 Regression] Objective-C(++) and C90 strict-aliasing interaction bug
- Auto-submitted: auto-generated
- References: <bug-39753-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39753
Nicola Pero <nicola at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |nicola at gcc dot gnu.org
--- Comment #10 from Nicola Pero <nicola at gcc dot gnu.org> 2011-03-19 00:22:52 UTC ---
Mike,
to clarify, the problem is that if you do not use -fno-strict-aliasing
when compiling Objective-C, then compiling any largish Objective-C project
(with perfectly correct Objective-C code) will generate many strict aliasing
warnings.
The rumours that GNUstep compiles everything with -fno-strict-aliasing are
correct - that is the case. The reason is simply to avoid the warnings.
But I guess that this means that all C code that is scattered inside
Objective-C source files is generally not optimized as much as it could be. :-(
So, it would be nice to clarify the problem once and for all, and make sure
it is safe to use -fstrict-aliasing in Objective-C (and it doesn't generate
warnings), then GNUstep could stop using -fno-strict-aliasing and people
could get the full benefit of -O2. :-)
The next step is producing a few testcases showing the actual warnings, so we
have something to discuss about. :-)
Thanks