<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
On Fri, 2011-12-09 at 07:40 -0800, Keith Packard wrote:
On Fri, 09 Dec 2011 07:45:01 -0500, Gaetan Nadon <<A HREF="mailto:firstname.lastname@example.org">email@example.com</A>> wrote:
> This function is deprecated because it defines -fno-strict-aliasing
> which alters the code generated by the compiler. If -fno-strict-aliasing
> is needed, then it should be added explicitly in the module when
> it is updated to use BASE_CFLAGS.
Does this change the default for this flag? -fno-strict-aliasing is
needed to preserve compatibility with older code, and I think it should
probably be on by default until a module owner disables it manually.
The content for CWARNFLAGS will always contain -fno-strict-aliasing.
# Minimum version: 1.2.0
# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
# Defines CWARNFLAGS to enable C compiler warnings.
# This function is deprecated because it defines -fno-strict-aliasing
# which alters the code generated by the compiler. If -fno-strict-aliasing
# is needed, then it should be added explicitly in the module when
# it is updated to use BASE_CFLAGS.
if test "x$GCC" = xyes ; then
]) # XORG_CWARNFLAGS
An alternative is now available which separates the warning flags from -fno-strict-aliasing. In the xserver configuration file, CWARNFLAGS has been replaced with:
which is equivalent to CWARNFLAGS in terms of -fno-strict-aliasing.<BR>
This separation allows (many) modules who do not want -fno-strict-aliasing to get the warning flags only. I originally thought that CWARNFLAGS would fall behind in terms of warning flags (past discussions), but I just noticed Jeremy reimplemented it such that it will be updated whenever the BASE_CFLAGS variable is updated. It isn't as deprecated as the comment says.<BR>
Thanks for talking a look at this.<BR>