This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Joe Buck <Joe dot Buck at synopsys dot com>
- Cc: bkorb at pacbell dot net (Bruce Korb), dewar at gnat dot com (Robert Dewar), zack at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: 01 Oct 2002 18:00:20 -0300
- Subject: Re: module level flags
- Organization: GCC Team, Red Hat
- References: <200210011827.LAA11402@atrus.synopsys.com>
On Oct 1, 2002, Joe Buck <Joe.Buck@synopsys.com> wrote:
> In practice, the case for unions will be supported by all compilers that
> are acceptable to users: code to use unions to get at the bit-level
> representation of floating-point numbers is required, and it is
> well-understood to be implementation-dependent. Without the ability to
> write unions one way and read them another way, it's not possible to
> write IEEE isnan() or isinf() routines in C; assembly would be needed.
Unless you use volatile.
>> A hard error would probably be inappropriate, since the compiler can't
>> tell in general whether the code in question would actually be
>> executed, a condition necessary for the undefined behavior to actually
>> be invoked.
> At least in the case where the bad code is always reached if the
> function is called, a hard error might be reasonable.
Nope. Consider a function that would only be called with arguments
that were known not to run into any aliasing problems. When the
compiler can't tell, it is required to translate the code.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer