diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-03-25 20:52:28 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-03-25 20:52:28 +0000 |
commit | 15e5ad7698ca582197d816b0e864d55bc0bdb607 (patch) | |
tree | 8c35b0cf468101ecc396f5eb7631e99dc328e79c /gcc/java | |
parent | 99ffa1e37aad3fafd771f47b56c0085ce5544727 (diff) | |
download | gcc-15e5ad7698ca582197d816b0e864d55bc0bdb607.zip gcc-15e5ad7698ca582197d816b0e864d55bc0bdb607.tar.gz gcc-15e5ad7698ca582197d816b0e864d55bc0bdb607.tar.bz2 |
toplev.c: Don't include setjmp.h.
* toplev.c: Don't include setjmp.h. Kill float_handler_set,
float_handled, float_handler, float_signal, set_float_handler,
and do_float_handler. Set handler for SIGFPE to crash_signal.
* toplev.h: Don't prototype do_float_handler.
* c-lex.c: Fold parse_float into lex_number. Make warning
about portability of hex float constants more informative, and
don't issue it on top of a syntax error.
* fold-const.c: Fold const_binop_1 and fold_convert_1 into
their callers.
* real.h: Define REAL_VALUE_ABS here...
* simplify-rtx.c: ... not here. Fold check_fold_consts,
simplify_unary_real, simplify_binary_real, and
simplify_binary_is2orm1 into their callers.
* tree.c: Fold build_real_from_int_cst_1 into caller.
* doc/tm.texi: Document REAL_VALUE_ABS and REAL_VALUE_NEGATIVE.
* tsystem.h: Include float.h here...
* libgcc2.c: ... not here.
java:
* lex.c: Change java_perform_atof to take normal parameters
instead of a pointer to a parameter block. Call it directly
from java_lex.
testsuite:
* gcc.dg/c90-hexfloat-1.c: Adjust error regexps.
From-SVN: r51336
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 40 | ||||
-rw-r--r-- | gcc/java/lex.c | 53 |
2 files changed, 42 insertions, 51 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 4d9b696..cb18fc5 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2002-03-25 Zack Weinberg <zack@codesourcery.com> + + * lex.c: Change java_perform_atof to take normal parameters + instead of a pointer to a parameter block. Call it directly + from java_lex. + 2002-03-22 Mark Wielaard <mark@klomp.org> Fix for PR java/5368: @@ -32,10 +38,10 @@ 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> - * gcj.texi: @code{gcj} becomes @command{gcj}. - @code{gcc} becomes @command{gcc}. - GcjRaw changed to gnu.gcc.RawData. - + * gcj.texi: @code{gcj} becomes @command{gcj}. + @code{gcc} becomes @command{gcc}. + GcjRaw changed to gnu.gcc.RawData. + 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (start_java_method): Use new hook. @@ -257,18 +263,18 @@ 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> - * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option - `--CLASSPATH' becomes `--classpath.' - * gjavah.c: Likewise. - * jcf-dump.c: Likewise. - * lang-options.h: Likewise. - * lang.c: Likewise. - * jcf-path.c: Updated comment. - (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.' - (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.' - * jcf.h (jcf_path_CLASSPATH_arg): Ditto. - (jcf_path_CLASSPATH_arg): Ditto. - (classpath_u): Updated leading comment. + * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option + `--CLASSPATH' becomes `--classpath.' + * gjavah.c: Likewise. + * jcf-dump.c: Likewise. + * lang-options.h: Likewise. + * lang.c: Likewise. + * jcf-path.c: Updated comment. + (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.' + (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.' + * jcf.h (jcf_path_CLASSPATH_arg): Ditto. + (jcf_path_CLASSPATH_arg): Ditto. + (classpath_u): Updated leading comment. 2002-02-20 Per Bothner <per@bothner.com> @@ -352,7 +358,7 @@ current_function_decl before building JNI stub. 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch> - + * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not BUILT_IN_SQRTF. diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 6e255d1..8c66118 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -828,38 +828,33 @@ java_parse_escape_sequence () } } -/* Isolate the code which may raise an arithmetic exception in its - own function. */ - #ifndef JC1_LITE -struct jpa_args -{ - YYSTYPE *java_lval; - char *literal_token; - int fflag; - int number_beginning; -}; - #define IS_ZERO(X) (ereal_cmp (X, dconst0) == 0) -static void java_perform_atof PARAMS ((PTR)); +/* Subroutine of java_lex: converts floating-point literals to tree + nodes. LITERAL_TOKEN is the input literal, JAVA_LVAL is where to + store the result. FFLAG indicates whether the literal was tagged + with an 'f', indicating it is of type 'float'; NUMBER_BEGINNING + is the line number on which to report any error. */ + +static void java_perform_atof PARAMS ((YYSTYPE *, char *, int, int)); static void -java_perform_atof (av) - PTR av; +java_perform_atof (java_lval, literal_token, fflag, number_beginning) + YYSTYPE *java_lval; + char *literal_token; + int fflag; + int number_beginning; { - struct jpa_args *a = (struct jpa_args *)av; - YYSTYPE *java_lval = a->java_lval; - int number_beginning = a->number_beginning; REAL_VALUE_TYPE value; - tree type = (a->fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); + tree type = (fflag ? FLOAT_TYPE_NODE : DOUBLE_TYPE_NODE); SET_REAL_VALUE_ATOF (value, - REAL_VALUE_ATOF (a->literal_token, TYPE_MODE (type))); + REAL_VALUE_ATOF (literal_token, TYPE_MODE (type))); if (REAL_VALUE_ISINF (value) || REAL_VALUE_ISNAN (value)) { - JAVA_FLOAT_RANGE_ERROR ((a->fflag ? "float" : "double")); + JAVA_FLOAT_RANGE_ERROR (fflag ? "float" : "double"); value = DCONST0; } else if (IS_ZERO (value)) @@ -867,7 +862,7 @@ java_perform_atof (av) /* We check to see if the value is really 0 or if we've found an underflow. We do this in the most primitive imaginable way. */ int really_zero = 1; - char *p = a->literal_token; + char *p = literal_token; if (*p == '-') ++p; while (*p && *p != 'e' && *p != 'E') @@ -1161,9 +1156,6 @@ java_lex (java_lval) } else { -#ifndef JC1_LITE - struct jpa_args a; -#endif if (stage != 4) /* Don't push back fF/dD. */ java_unget_unicode (); @@ -1176,17 +1168,10 @@ java_lex (java_lval) JAVA_LEX_LIT (literal_token, radix); #ifndef JC1_LITE - a.literal_token = literal_token; - a.fflag = fflag; - a.java_lval = java_lval; - a.number_beginning = number_beginning; - if (do_float_handler (java_perform_atof, (PTR) &a)) - return FP_LIT_TK; - - JAVA_FLOAT_RANGE_ERROR ((fflag ? "float" : "double")); -#else - return FP_LIT_TK; + java_perform_atof (java_lval, literal_token, + fflag, number_beginning); #endif + return FP_LIT_TK; } } } /* JAVA_ASCII_FPCHAR (c) */ |