diff options
author | Ulrich Drepper <drepper@cygnus.com> | 1998-12-01 21:05:17 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-12-01 13:05:17 -0800 |
commit | 6f4d72224e91330c6c02d5b96b04b97e84024589 (patch) | |
tree | 8180a32dab64f00b8c46fedcdc5e7b9928102158 /gcc/real.h | |
parent | 8da31fc17102a9413921d73c8b15834851eba567 (diff) | |
download | gcc-6f4d72224e91330c6c02d5b96b04b97e84024589.zip gcc-6f4d72224e91330c6c02d5b96b04b97e84024589.tar.gz gcc-6f4d72224e91330c6c02d5b96b04b97e84024589.tar.bz2 |
c-common.c (declare_function_name): Declare predefinied variable `__func__'.
* c-common.c (declare_function_name): Declare predefinied variable
`__func__'.
* c-decl.c (flag_isoc9x): Set to 1 by default.
(c_decode_option): Handle -std= option. Remove -flang-isoc9x.
(grokdeclarator): Always emit warning about implicit int for ISO C 9x.
* c-parse.in: Allow constructors in ISO C 9x.
Rewrite designator list handling.
Allow [*] parameters.
Don't warn about comma at end of enum definition for ISO C 9x.
* cccp.c (c9x): New variable.
(rest_extension): New variable.
(print_help): Document new -std= option.
(main): Recognize -std= option. Set c9x appropriately.
(create_definition): Recognize ISO C 9x vararg macros.
* gcc.c (default_compilers): Adjust specs for -std options.
(option_map): Add --std.
(display_help): Document -std.
* toplev.c (documented_lang_options): Add -std and remove
-flang-isoc9x.
* c-lex.c (yylex): Recognize hex FP constants and call REAL_VALUE_ATOF
or REAL_VALUE_HTOF based on base of the constants.
* fold-const.c (real_hex_to_f): New function. Replacement function
for hex FP conversion if REAL_ARITHMETIC is not defined.
* real.c (asctoeg): Add handling of hex FP constants.
* real.h: Define REAL_VALUE_HTOF if necessary using ereal_atof or
real_hex_to_f.
Co-Authored-By: Richard Henderson <rth@cygnus.com>
Co-Authored-By: Stephen L Moshier <moshier@world.std.com>
From-SVN: r24049
Diffstat (limited to 'gcc/real.h')
-rw-r--r-- | gcc/real.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* Definitions of floating-point access for GNU compiler. - Copyright (C) 1989, 1991, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1989, 91, 94, 96, 97, 98 Free Software Foundation, Inc. This file is part of GNU CC. @@ -178,7 +178,11 @@ extern REAL_VALUE_TYPE real_value_truncate PROTO ((enum machine_mode, toward zero. */ #define REAL_VALUE_UNSIGNED_FIX(x) (efixui (x)) +/* Convert ASCII string S to floating point in mode M. + Decimal input uses ATOF. Hexadecimal uses HTOF. */ #define REAL_VALUE_ATOF ereal_atof +#define REAL_VALUE_HTOF ereal_atof + #define REAL_VALUE_NEGATE ereal_negate #define REAL_VALUE_MINUS_ZERO(x) \ @@ -355,6 +359,9 @@ extern double ldexp (); /* Use real.c to convert decimal numbers to binary, ... */ REAL_VALUE_TYPE ereal_atof (); #define REAL_VALUE_ATOF(x, s) ereal_atof (x, s) +/* Could use ereal_atof here for hexadecimal floats too, but real_hex_to_f + is OK and it uses faster native fp arithmetic. */ +/* #define REAL_VALUE_HTOF(x, s) ereal_atof (x, s) */ #else /* ... or, if you like the host computer's atof, go ahead and use it: */ #define REAL_VALUE_ATOF(x, s) atof (x) @@ -369,6 +376,13 @@ extern double (atof) (); #endif #endif +/* Hexadecimal floating constant input for use with host computer's + fp arithmetic. */ +#ifndef REAL_VALUE_HTOF +extern REAL_VALUE_TYPE real_hex_to_f PROTO((char *, enum machine_mode)); +#define REAL_VALUE_HTOF(s,m) real_hex_to_f(s,m) +#endif + /* Negate the floating-point value X. */ #ifndef REAL_VALUE_NEGATE #define REAL_VALUE_NEGATE(x) (- (x)) |