diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2002-05-22 22:02:16 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2002-05-22 22:02:16 +0000 |
commit | df3834838116b327a61f5a9e271e54c75ad34085 (patch) | |
tree | d48c115c626bc1be9e16db74afd070b025a875ce /gcc/cpplex.c | |
parent | 2dd36f90d8c4f5b86667cbb11c86f6c790bd784b (diff) | |
download | gcc-df3834838116b327a61f5a9e271e54c75ad34085.zip gcc-df3834838116b327a61f5a9e271e54c75ad34085.tar.gz gcc-df3834838116b327a61f5a9e271e54c75ad34085.tar.bz2 |
cpperror.c: Fix formatting.
* cpperror.c: Fix formatting.
* cppexp.c: Likewise.
* cppfiles.c: Likewise.
* cpphash.c: Likewise.
* cpphash.h: Likewise.
* cppinit.c: Likewise.
* cpplex.c: Likewise.
* cpplib.c: Likewise.
* cppmacro.c: Likewise.
* cppmain.c: Likewise.
* cppspec.c: Likewise.
From-SVN: r53751
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 44ca1d8..2baa3e0 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -71,7 +71,7 @@ static void adjust_column PARAMS ((cpp_reader *)); static int skip_whitespace PARAMS ((cpp_reader *, cppchar_t)); static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *)); static uchar *parse_slow PARAMS ((cpp_reader *, const uchar *, int, - unsigned int *)); + unsigned int *)); static void parse_number PARAMS ((cpp_reader *, cpp_string *, int)); static int unescaped_terminator_p PARAMS ((cpp_reader *, const uchar *)); static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t)); @@ -247,7 +247,7 @@ get_effective_char (pfile) if (__builtin_expect (next == '?' || next == '\\', 0)) next = skip_escaped_newlines (pfile); - return next; + return next; } /* Skip a C-style block comment. We find the end of the comment by @@ -424,7 +424,7 @@ name_p (pfile, string) if (!is_idchar (string->text[i])) return 0; - return 1; + return 1; } /* Parse an identifier, skipping embedded backslash-newlines. This is @@ -533,15 +533,15 @@ parse_slow (pfile, cur, number_p, plen) /* Handle normal identifier characters in this loop. */ do - { + { prevc = c; - obstack_1grow (stack, c); + obstack_1grow (stack, c); - if (c == '$') - saw_dollar++; + if (c == '$') + saw_dollar++; - c = *buffer->cur++; - } + c = *buffer->cur++; + } while (is_idchar (c)); } @@ -665,7 +665,7 @@ parse_string (pfile, token, terminator) if (char_len == -1) { cpp_error (pfile, DL_WARNING, - "ignoring invalid multibyte character"); + "ignoring invalid multibyte character"); char_len = 1; c = *buffer->cur++; } @@ -739,7 +739,7 @@ save_comment (pfile, token, from, type) { unsigned char *buffer; unsigned int len, clen; - + len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */ /* C++ comments probably (not definitely) have moved past a new @@ -756,7 +756,7 @@ save_comment (pfile, token, from, type) clen = (pfile->state.in_directive && type == '/') ? len + 2 : len; buffer = _cpp_unaligned_alloc (pfile, clen); - + token->type = CPP_COMMENT; token->val.str.len = clen; token->val.str.text = buffer; @@ -888,7 +888,7 @@ continue_after_nul (pfile) { cpp_buffer *buffer = pfile->buffer; bool more = false; - + buffer->saved_flags = BOL; if (CPP_OPTION (pfile, traditional)) more = _cpp_read_logical_line_trad (pfile); @@ -1029,19 +1029,19 @@ _cpp_lex_direct (pfile) case 'L': /* 'L' may introduce wide characters or strings. */ - { - const unsigned char *pos = buffer->cur; + { + const unsigned char *pos = buffer->cur; - c = get_effective_char (pfile); - if (c == '\'' || c == '"') - { - result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR); - parse_string (pfile, result, c); - break; - } - buffer->cur = pos; - } - /* Fall through. */ + c = get_effective_char (pfile); + if (c == '\'' || c == '"') + { + result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR); + parse_string (pfile, result, c); + break; + } + buffer->cur = pos; + } + /* Fall through. */ start_ident: case '_': @@ -1091,7 +1091,7 @@ _cpp_lex_direct (pfile) && ! buffer->warned_cplusplus_comments) { cpp_error (pfile, DL_PEDWARN, - "C++ style comments are not allowed in ISO C89"); + "C++ style comments are not allowed in ISO C89"); cpp_error (pfile, DL_PEDWARN, "(this will be reported only once per input file)"); buffer->warned_cplusplus_comments = 1; @@ -1274,7 +1274,7 @@ _cpp_lex_direct (pfile) result->type = CPP_AND; } break; - + case '|': c = get_effective_char (pfile); if (c == '|') @@ -1381,7 +1381,7 @@ cpp_spell_token (pfile, token, buffer) goto spell_ident; else spelling = TOKEN_NAME (token); - + while ((c = *spelling++) != '\0') *buffer++ = c; } @@ -1789,7 +1789,7 @@ cpp_parse_escape (pfile, pstr, limit, wide) "non-ISO-standard escape sequence, '\\%c'", (int) c); c = TARGET_ESC; break; - + case 'u': case 'U': unknown = maybe_read_ucs (pfile, &str, limit, &c); break; @@ -1799,33 +1799,33 @@ cpp_parse_escape (pfile, pstr, limit, wide) cpp_error (pfile, DL_WARNING, "the meaning of '\\x' is different in traditional C"); - { - cppchar_t i = 0, overflow = 0; - int digits_found = 0; + { + cppchar_t i = 0, overflow = 0; + int digits_found = 0; - while (str < limit) - { - c = *str; - if (! ISXDIGIT (c)) - break; - str++; - overflow |= i ^ (i << 4 >> 4); - i = (i << 4) + hex_digit_value (c); - digits_found = 1; - } + while (str < limit) + { + c = *str; + if (! ISXDIGIT (c)) + break; + str++; + overflow |= i ^ (i << 4 >> 4); + i = (i << 4) + hex_digit_value (c); + digits_found = 1; + } - if (!digits_found) - cpp_error (pfile, DL_ERROR, + if (!digits_found) + cpp_error (pfile, DL_ERROR, "\\x used with no following hex digits"); - if (overflow | (i != (i & mask))) - { - cpp_error (pfile, DL_PEDWARN, - "hex escape sequence out of range"); - i &= mask; - } - c = i; - } + if (overflow | (i != (i & mask))) + { + cpp_error (pfile, DL_PEDWARN, + "hex escape sequence out of range"); + i &= mask; + } + c = i; + } break; case '0': case '1': case '2': case '3': @@ -1949,7 +1949,7 @@ cpp_interpret_charconst (pfile, token, pchars_seen, unsignedp) if (ISPRINT (c)) c = MAP_CHARACTER (c); #endif - + chars_seen++; /* Truncate the character, scale the result and merge the two. */ |