This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: alpha IEEE floating-point patch


Yes, -fno-math-errno would be nice.

I tried to come up with an easy patch that would work, but I can't get it
to work.  Here's what I tried:

===================================================================
RCS file: RCS/toplev.c,v
retrieving revision 1.1
diff -c -r1.1 toplev.c
*** toplev.c	1999/08/26 16:00:46	1.1
--- toplev.c	1999/08/26 18:16:41
***************
*** 978,984 ****
    {"leading-underscore", &flag_leading_underscore, 1,
     "External symbols have a leading underscore" },
    {"ident", &flag_no_ident, 0,
!    "Process #ident directives"}
  };
  
  #define NUM_ELEM(a)  (sizeof (a) / sizeof ((a)[0]))
--- 978,986 ----
    {"leading-underscore", &flag_leading_underscore, 1,
     "External symbols have a leading underscore" },
    {"ident", &flag_no_ident, 0,
!    "Process #ident directives"},
!   {"math-errno", &flag_errno_math, !0,
!    "Set errno after built-in math functions"}
  };
  
  #define NUM_ELEM(a)  (sizeof (a) / sizeof ((a)[0]))
***************
*** 1032,1037 ****
--- 1034,1040 ----
    { "-fno-short-double", "" },
    { "-fshort-enums", "Use the smallest fitting integer to hold enums"},
    { "-fno-short-enums", "" },
+   { "-fno-math-errno", "Do not set errno after built-in math functions"},
  
    { "-Wall", "Enable most warning messages" },
    { "-Wbad-function-cast",


I had some difficulty understanding what was meant by "opposite" in this
comment in toplev.c until I read the code using f_options:

/* Table of language-independent -f options.
   STRING is the option name.  VARIABLE is the address of the variable.
   ON_VALUE is the value to store in VARIABLE
    if `-fSTRING' is seen as an option.
   (If `-fno-STRING' is seen as an option, the opposite value is stored.)  */

I'm sorry I can't offer a patch that works, but I really would appreciate
an option that allows me to turn off flag_errno_math.

Brad Lucier     lucier@math.purdue.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]