diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-07 05:49:18 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-07 05:49:18 +0000 |
commit | 7014838cdd847f5d22f8b4bff0285ad622b707b5 (patch) | |
tree | f1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/c-lex.c | |
parent | 713829e97b2cabe9369424002f6efb23a7c86aba (diff) | |
download | gcc-7014838cdd847f5d22f8b4bff0285ad622b707b5.tar.gz |
Merge in gcc2-ss-010999
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 79002f3e3fd..ccb113f1671 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -45,6 +45,9 @@ Boston, MA 02111-1307, USA. */ #include "mbchar.h" #include <locale.h> #endif /* MULTIBYTE_CHARS */ +#ifndef GET_ENVIRONMENT +#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ((ENV_VALUE) = getenv (ENV_NAME)) +#endif #if USE_CPPLIB #include "cpplib.h" @@ -279,7 +282,7 @@ init_lex () #ifdef MULTIBYTE_CHARS /* Change to the native locale for multibyte conversions. */ setlocale (LC_CTYPE, ""); - literal_codeset = getenv ("LANG"); + GET_ENVIRONMENT (literal_codeset, "LANG"); #endif maxtoken = 40; @@ -1529,7 +1532,7 @@ yylex () #define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2) unsigned int parts[TOTAL_PARTS]; - enum anon1 { NOT_FLOAT, AFTER_POINT, TOO_MANY_POINTS, AFTER_EXPON } + enum anon1 { NOT_FLOAT, AFTER_POINT, TOO_MANY_POINTS, AFTER_EXPON} floatflag = NOT_FLOAT; for (count = 0; count < TOTAL_PARTS; count++) @@ -1970,7 +1973,7 @@ yylex () int max_chars; #ifdef MULTIBYTE_CHARS int longest_char = local_mb_cur_max (); - local_mbtowc (NULL_PTR, NULL_PTR, 0); + (void) local_mbtowc (NULL_PTR, NULL_PTR, 0); #endif max_chars = TYPE_PRECISION (integer_type_node) / width; @@ -2091,7 +2094,7 @@ yylex () } if (c != '\'') - error ("malformatted character constant"); + error ("malformed character constant"); else if (chars_seen == 0) error ("empty character constant"); else if (num_chars > max_chars) @@ -2139,9 +2142,8 @@ yylex () : TYPE_PRECISION (char_type_node); #ifdef MULTIBYTE_CHARS int longest_char = local_mb_cur_max (); - local_mbtowc (NULL_PTR, NULL_PTR, 0); + (void) local_mbtowc (NULL_PTR, NULL_PTR, 0); #endif - c = token_getch (); p = token_buffer + 1; |