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
This commit is contained in:
parent
2dd36f90d8
commit
df38348381
@ -1,3 +1,17 @@
|
||||
2002-05-22 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* 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.
|
||||
|
||||
2002-05-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* combine.c (force_to_mode): Use gen_int_mode.
|
||||
|
@ -276,7 +276,7 @@ open_file (pfile, filename)
|
||||
/* For DJGPP redirected input is opened in text mode. Change it
|
||||
to binary mode. */
|
||||
if (! isatty (file->fd))
|
||||
setmode (file->fd, O_BINARY);
|
||||
setmode (file->fd, O_BINARY);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -1052,7 +1052,7 @@ remove_component_p (path)
|
||||
nonzero if an error occurred when using stat () or lstat (). */
|
||||
char *
|
||||
_cpp_simplify_pathname (path)
|
||||
char *path;
|
||||
char *path;
|
||||
{
|
||||
#ifndef VMS
|
||||
char *from, *to;
|
||||
|
@ -303,7 +303,7 @@ remove_dup_dirs (pfile, head)
|
||||
for (cur = head; cur; cur = cur->next)
|
||||
{
|
||||
for (other = head; other != cur; other = other->next)
|
||||
if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev)
|
||||
if (INO_T_EQ (cur->ino, other->ino) && cur->dev == other->dev)
|
||||
{
|
||||
if (cur->sysp && !other->sysp)
|
||||
{
|
||||
@ -1373,10 +1373,10 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
CPP_OPTION (pfile, help_only) = 1;
|
||||
break;
|
||||
case OPT_target__help:
|
||||
/* Print if any target specific options. cpplib has none, but
|
||||
/* Print if any target specific options. cpplib has none, but
|
||||
make sure help_only gets set. */
|
||||
CPP_OPTION (pfile, help_only) = 1;
|
||||
break;
|
||||
break;
|
||||
|
||||
/* --version inhibits compilation, -version doesn't. -v means
|
||||
verbose and -version. Historical reasons, don't ask. */
|
||||
@ -1415,11 +1415,11 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
CPP_OPTION (pfile, pedantic_errors) = 1;
|
||||
/* fall through */
|
||||
case OPT_pedantic:
|
||||
CPP_OPTION (pfile, pedantic) = 1;
|
||||
CPP_OPTION (pfile, pedantic) = 1;
|
||||
CPP_OPTION (pfile, warn_endif_labels) = 1;
|
||||
break;
|
||||
case OPT_trigraphs:
|
||||
CPP_OPTION (pfile, trigraphs) = 1;
|
||||
CPP_OPTION (pfile, trigraphs) = 1;
|
||||
break;
|
||||
case OPT_remap:
|
||||
CPP_OPTION (pfile, remap) = 1;
|
||||
@ -1489,13 +1489,13 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
/* Args to -d specify what parts of macros to dump.
|
||||
Silently ignore unrecognised options; they may
|
||||
be aimed at the compiler proper. */
|
||||
{
|
||||
{
|
||||
char c;
|
||||
|
||||
while ((c = *arg++) != '\0')
|
||||
switch (c)
|
||||
{
|
||||
case 'M':
|
||||
switch (c)
|
||||
{
|
||||
case 'M':
|
||||
CPP_OPTION (pfile, dump_macros) = dump_only;
|
||||
break;
|
||||
case 'N':
|
||||
@ -1529,7 +1529,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
case OPT_MF:
|
||||
CPP_OPTION (pfile, deps_file) = arg;
|
||||
break;
|
||||
case OPT_MP:
|
||||
case OPT_MP:
|
||||
CPP_OPTION (pfile, deps_phony_targets) = 1;
|
||||
break;
|
||||
case OPT_MQ:
|
||||
@ -1575,7 +1575,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
break;
|
||||
case OPT_I: /* Add directory to path for includes. */
|
||||
if (!strcmp (arg, "-"))
|
||||
{
|
||||
{
|
||||
/* -I- means:
|
||||
Use the preceding -I directories for #include "..."
|
||||
but not #include <...>.
|
||||
@ -1595,8 +1595,8 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
cpp_error (pfile, DL_FATAL, "-I- specified twice");
|
||||
return argc;
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
append_include_chain (pfile, xstrdup (arg), BRACKET, 0);
|
||||
break;
|
||||
case OPT_isystem:
|
||||
@ -1701,7 +1701,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
||||
else if (! ignore)
|
||||
return i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return i + 1;
|
||||
}
|
||||
|
90
gcc/cpplex.c
90
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
|
||||
@ -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++;
|
||||
}
|
||||
@ -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;
|
||||
@ -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':
|
||||
|
@ -400,8 +400,8 @@ _cpp_handle_directive (pfile, indented)
|
||||
requested to expand comments into macros, then re-enable
|
||||
saving of comments. */
|
||||
if (dir == &dtable[T_DEFINE])
|
||||
pfile->state.save_comments =
|
||||
! CPP_OPTION (pfile, discard_comments_in_macro_exp);
|
||||
pfile->state.save_comments =
|
||||
! CPP_OPTION (pfile, discard_comments_in_macro_exp);
|
||||
|
||||
pfile->directive = dir;
|
||||
(*pfile->directive->handler) (pfile);
|
||||
|
@ -1584,9 +1584,9 @@ cpp_macro_definition (pfile, node)
|
||||
}
|
||||
|
||||
if (i + 1 < macro->paramc)
|
||||
/* Don't emit a space after the comma here; we're trying
|
||||
to emit a Dwarf-friendly definition, and the Dwarf spec
|
||||
forbids spaces in the argument list. */
|
||||
/* Don't emit a space after the comma here; we're trying
|
||||
to emit a Dwarf-friendly definition, and the Dwarf spec
|
||||
forbids spaces in the argument list. */
|
||||
*buffer++ = ',';
|
||||
else if (macro->variadic)
|
||||
*buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
|
||||
|
Loading…
Reference in New Issue
Block a user