diff options
author | Jeff Law <law@gcc.gnu.org> | 1999-09-06 23:49:18 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-09-06 23:49:18 -0600 |
commit | c5c7673583c6310e7f8e45704fdc4aadff33e393 (patch) | |
tree | f1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/c-lex.c | |
parent | ad85216ece38be37dacbbb3fa7bb7db69aa33a4b (diff) | |
download | gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.zip gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.gz gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.bz2 |
Merge in gcc2-ss-010999
From-SVN: r29150
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 79002f3..ccb113f 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; |