freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] gcc 3.3 and strict aliasing


From: Werner LEMBERG
Subject: Re: [Devel] gcc 3.3 and strict aliasing
Date: Mon, 16 Jun 2003 23:30:02 +0200 (CEST)

> compiling from a fresh CVS with gcc 3.3 on Linux, I get 'warning:
> dereferencing type-punned pointer will break strict-aliasing rule'
> on many places, like every line of freetype/config/ftmodule.h when
> included from src/base/ftinit.c, and all FT_FREE() and FT_NEW()
> calls.

Please send me a compilation log (compressed).

> The '-O2' optimisation turns on gcc's -fstrict-aliasing, whose doc
> is : "Allows the compiler to assume the strictest aliasing rules
> applicable to the language being compiled.  For C (and C++), this
> activates optimizations based on the type of expressions.  In
> particular, an object of one type is assumed never to reside at the
> same address as an object of a different type, unless the types are
> almost the same.  For example, an "unsigned int" can alias an "int",
> but not a "void*" or a "double".  A character type may alias any
> other type."

We've already tried very hard to use exact types as much as possible,
adding many, many casts.  Apparently, gcc becomes pickier and
pickier...


    Werner



reply via email to

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