diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-17 00:54:25 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-17 00:54:25 +0000 |
commit | 58f9db871e93ba5851e7d1ba820533c86518b2ab (patch) | |
tree | 3c8bb9a066d5c956f9d8bb26a8f15c3f4286bd4b /gcc/real.c | |
parent | a449215f3d0a567d6566f633ca3925e1ab954401 (diff) | |
download | gcc-58f9db871e93ba5851e7d1ba820533c86518b2ab.tar.gz |
* Makefile.in ($(srcdir)/c-parse.y: c-parse.in): Enclose the whole
message in quotes. Otherwise, IBM's make program treats the '#' as the
start of a comment and ignores the remainder of the line.
* c-lex.c (yylex): Change for EBCDIC, lower case characters preceed
upper case.
* cccp.c (initialize_char_syntax): Allow for holes in EBCDIC.
* cexp.y (initialize_random_junk): Likewise.
* cppfiles.c (find_include_file): Cast alloca return value.
* cppinit.c (initialize_standard_includes): Likewise.
* cpplib.c (cpp_define, cpp_undef): Likewise.
* defaults.h (ASM_OUTPUT_ASCII): Use ISPRINT.
* final.c (output_asm_insn): Allow for holes in EBCDIC.
* fold-const.c (CHARMASK): New.
(real_hex_to_f): Use it.
* real.c (CHARMASK): New.
(etoasc, asctoeg): Use it.
(asctoeg): EBCDIC lower case characters preceed upper case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/real.c b/gcc/real.c index 6acd2bf376a..2022aacbeb9 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -337,6 +337,13 @@ do { \ /* The exponent of 1.0 */ #define EXONE (0x3fff) +#if defined(HOST_EBCDIC) +/* bit 8 is significant in EBCDIC */ +#define CHARMASK 0xff +#else +#define CHARMASK 0x7f +#endif + extern int extra_warnings; extern unsigned EMUSHORT ezero[], ehalf[], eone[], etwo[]; extern unsigned EMUSHORT elog2[], esqrt2[]; @@ -4981,7 +4988,7 @@ etoasc (x, string, ndigs) /* Round up and propagate carry-outs */ roun: --s; - k = *s & 0x7f; + k = *s & CHARMASK; /* Carry out to most significant digit? */ if (k == '.') { @@ -5142,7 +5149,7 @@ asctoeg (ss, y, oprec) nxtcom: if (*s >= '0' && *s <= '9') k = *s - '0'; - else if (*s >= 'a') + else if (*s >= 'a' && *s <= 'f') k = 10 + *s - 'a'; else k = 10 + *s - 'A'; @@ -5160,7 +5167,7 @@ asctoeg (ss, y, oprec) || (*sp >= 'A' && *sp <= 'F')))) ++sp; /* Check for syntax error */ - c = *sp & 0x7f; + c = *sp & CHARMASK; if ((base != 10 || ((c != 'e') && (c != 'E'))) && (base != 16 || ((c != 'p') && (c != 'P'))) && (c != '\0') |