[llvm-commits] [llvm-gcc-4.2] r63322 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.c

Dale Johannesen dalej at apple.com
Thu Jan 29 10:22:21 PST 2009


On Jan 29, 2009, at 10:16 AMPST, Chris Lattner wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=63322&view=rev
> Log:
> Default -fno-math-errno to on with all i386 targets.  This is after  
> discussion
> with Anton and Duncan.  -fmath-errno still works to enable it.

This is a violation of the C89 standard and can break programs that  
are correct under that standard.  It may be the right thing to do  
anyway, but the justification should mention that you've taken this  
into account.

> Modified:
>    llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=63322&r1=63321&r2=63322&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Thu Jan 29 12:16:31 2009
> @@ -2438,7 +2438,16 @@
>   flag_trapping_math = 0;
>   /* APPLE LOCAL end pragma fenv */
>
> -  if (TARGET_MACHO)
> +  /* APPLE LOCAL begin LLVM */
> +  /* Enable -fno-math-errno by default, even on systems whose libm  
> functions set
> +     errno.  This is a deviation from what mainline GCC does, but  
> it is a) good
> +     for performance, b) controllable with -fmath-errno, and c) the  
> default
> +     behavior most people want anyway.  Numericists and others who  
> play with or
> +     depend on errno and can use -fmath-errno when they want it.   
> Because errno
> +     is not set on all targets anyway, their code is inherently non- 
> portable. */
> +  if (TARGET_MACHO || 1)
> +  /* APPLE LOCAL end LLVM */
> +
>     /* The Darwin libraries never set errno, so we might as well
>        avoid calling them when that's the only reason we would.  */
>     flag_errno_math = 0;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list