<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Mon, 2010-11-01 at 11:32 +0100, Mark Kettenis wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<TT><FONT COLOR="#1a1a1a">I may be somewhat overcautious, but I would keep -fno-strict-aliasing</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">as a default. And I'd only enable -fstrict-aliasing for particular</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">bits of code where it has a significant performance benefit, and</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">people have done a careful analysis of the code to see if it is free</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">of aliasing issues.</FONT></TT><BR>
</BLOCKQUOTE>
<BR>
The cautious approach is the only one that will get consensus.<BR>
Here is a proposal:<BR>
<BR>
<OL TYPE=1>
<LI TYPE=1 VALUE=1>Separate the aliasing flag from the warning flags as outlined in a previous post. This is prep work, status quo is preserved. In addition it prevents adding aliasing flag to modules that currently don't have it without their knowledge or consent.
<LI TYPE=1 VALUE=2>On a per module basis, remove the no aliasing option where there is a technical agreement.
</OL>
<BR>
It is the same concept you proposed, but the implementation is reversed so we don't have both -fno-strict-aliasing and -fstrict-aliasing on the same gcc command. Also note that not all modules have CWARNFLAGS in their Makefiles.<BR>
<BR>
This preserves backward compatibility as CWARNFLAGS remains intact for previous versions of the modules.
</BODY>
</HTML>