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>
|
2002-05-22 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* combine.c (force_to_mode): Use gen_int_mode.
|
* 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
|
/* For DJGPP redirected input is opened in text mode. Change it
|
||||||
to binary mode. */
|
to binary mode. */
|
||||||
if (! isatty (file->fd))
|
if (! isatty (file->fd))
|
||||||
setmode (file->fd, O_BINARY);
|
setmode (file->fd, O_BINARY);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1052,7 +1052,7 @@ remove_component_p (path)
|
|||||||
nonzero if an error occurred when using stat () or lstat (). */
|
nonzero if an error occurred when using stat () or lstat (). */
|
||||||
char *
|
char *
|
||||||
_cpp_simplify_pathname (path)
|
_cpp_simplify_pathname (path)
|
||||||
char *path;
|
char *path;
|
||||||
{
|
{
|
||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
char *from, *to;
|
char *from, *to;
|
||||||
|
@ -303,7 +303,7 @@ remove_dup_dirs (pfile, head)
|
|||||||
for (cur = head; cur; cur = cur->next)
|
for (cur = head; cur; cur = cur->next)
|
||||||
{
|
{
|
||||||
for (other = head; other != cur; other = other->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)
|
if (cur->sysp && !other->sysp)
|
||||||
{
|
{
|
||||||
@ -1373,10 +1373,10 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
|||||||
CPP_OPTION (pfile, help_only) = 1;
|
CPP_OPTION (pfile, help_only) = 1;
|
||||||
break;
|
break;
|
||||||
case OPT_target__help:
|
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. */
|
make sure help_only gets set. */
|
||||||
CPP_OPTION (pfile, help_only) = 1;
|
CPP_OPTION (pfile, help_only) = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* --version inhibits compilation, -version doesn't. -v means
|
/* --version inhibits compilation, -version doesn't. -v means
|
||||||
verbose and -version. Historical reasons, don't ask. */
|
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;
|
CPP_OPTION (pfile, pedantic_errors) = 1;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case OPT_pedantic:
|
case OPT_pedantic:
|
||||||
CPP_OPTION (pfile, pedantic) = 1;
|
CPP_OPTION (pfile, pedantic) = 1;
|
||||||
CPP_OPTION (pfile, warn_endif_labels) = 1;
|
CPP_OPTION (pfile, warn_endif_labels) = 1;
|
||||||
break;
|
break;
|
||||||
case OPT_trigraphs:
|
case OPT_trigraphs:
|
||||||
CPP_OPTION (pfile, trigraphs) = 1;
|
CPP_OPTION (pfile, trigraphs) = 1;
|
||||||
break;
|
break;
|
||||||
case OPT_remap:
|
case OPT_remap:
|
||||||
CPP_OPTION (pfile, remap) = 1;
|
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.
|
/* Args to -d specify what parts of macros to dump.
|
||||||
Silently ignore unrecognised options; they may
|
Silently ignore unrecognised options; they may
|
||||||
be aimed at the compiler proper. */
|
be aimed at the compiler proper. */
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
while ((c = *arg++) != '\0')
|
while ((c = *arg++) != '\0')
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'M':
|
case 'M':
|
||||||
CPP_OPTION (pfile, dump_macros) = dump_only;
|
CPP_OPTION (pfile, dump_macros) = dump_only;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
@ -1529,7 +1529,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
|||||||
case OPT_MF:
|
case OPT_MF:
|
||||||
CPP_OPTION (pfile, deps_file) = arg;
|
CPP_OPTION (pfile, deps_file) = arg;
|
||||||
break;
|
break;
|
||||||
case OPT_MP:
|
case OPT_MP:
|
||||||
CPP_OPTION (pfile, deps_phony_targets) = 1;
|
CPP_OPTION (pfile, deps_phony_targets) = 1;
|
||||||
break;
|
break;
|
||||||
case OPT_MQ:
|
case OPT_MQ:
|
||||||
@ -1575,7 +1575,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
|||||||
break;
|
break;
|
||||||
case OPT_I: /* Add directory to path for includes. */
|
case OPT_I: /* Add directory to path for includes. */
|
||||||
if (!strcmp (arg, "-"))
|
if (!strcmp (arg, "-"))
|
||||||
{
|
{
|
||||||
/* -I- means:
|
/* -I- means:
|
||||||
Use the preceding -I directories for #include "..."
|
Use the preceding -I directories for #include "..."
|
||||||
but not #include <...>.
|
but not #include <...>.
|
||||||
@ -1595,8 +1595,8 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
|||||||
cpp_error (pfile, DL_FATAL, "-I- specified twice");
|
cpp_error (pfile, DL_FATAL, "-I- specified twice");
|
||||||
return argc;
|
return argc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
append_include_chain (pfile, xstrdup (arg), BRACKET, 0);
|
append_include_chain (pfile, xstrdup (arg), BRACKET, 0);
|
||||||
break;
|
break;
|
||||||
case OPT_isystem:
|
case OPT_isystem:
|
||||||
@ -1701,7 +1701,7 @@ cpp_handle_option (pfile, argc, argv, ignore)
|
|||||||
else if (! ignore)
|
else if (! ignore)
|
||||||
return i;
|
return i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return i + 1;
|
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 int skip_whitespace PARAMS ((cpp_reader *, cppchar_t));
|
||||||
static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *));
|
static cpp_hashnode *parse_identifier PARAMS ((cpp_reader *));
|
||||||
static uchar *parse_slow PARAMS ((cpp_reader *, const uchar *, int,
|
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 void parse_number PARAMS ((cpp_reader *, cpp_string *, int));
|
||||||
static int unescaped_terminator_p PARAMS ((cpp_reader *, const uchar *));
|
static int unescaped_terminator_p PARAMS ((cpp_reader *, const uchar *));
|
||||||
static void parse_string PARAMS ((cpp_reader *, cpp_token *, cppchar_t));
|
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))
|
if (__builtin_expect (next == '?' || next == '\\', 0))
|
||||||
next = skip_escaped_newlines (pfile);
|
next = skip_escaped_newlines (pfile);
|
||||||
|
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip a C-style block comment. We find the end of the comment by
|
/* 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. */
|
/* Handle normal identifier characters in this loop. */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
prevc = c;
|
prevc = c;
|
||||||
obstack_1grow (stack, c);
|
obstack_1grow (stack, c);
|
||||||
|
|
||||||
if (c == '$')
|
if (c == '$')
|
||||||
saw_dollar++;
|
saw_dollar++;
|
||||||
|
|
||||||
c = *buffer->cur++;
|
c = *buffer->cur++;
|
||||||
}
|
}
|
||||||
while (is_idchar (c));
|
while (is_idchar (c));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ parse_string (pfile, token, terminator)
|
|||||||
if (char_len == -1)
|
if (char_len == -1)
|
||||||
{
|
{
|
||||||
cpp_error (pfile, DL_WARNING,
|
cpp_error (pfile, DL_WARNING,
|
||||||
"ignoring invalid multibyte character");
|
"ignoring invalid multibyte character");
|
||||||
char_len = 1;
|
char_len = 1;
|
||||||
c = *buffer->cur++;
|
c = *buffer->cur++;
|
||||||
}
|
}
|
||||||
@ -1029,19 +1029,19 @@ _cpp_lex_direct (pfile)
|
|||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
/* 'L' may introduce wide characters or strings. */
|
/* 'L' may introduce wide characters or strings. */
|
||||||
{
|
{
|
||||||
const unsigned char *pos = buffer->cur;
|
const unsigned char *pos = buffer->cur;
|
||||||
|
|
||||||
c = get_effective_char (pfile);
|
c = get_effective_char (pfile);
|
||||||
if (c == '\'' || c == '"')
|
if (c == '\'' || c == '"')
|
||||||
{
|
{
|
||||||
result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR);
|
result->type = (c == '"' ? CPP_WSTRING: CPP_WCHAR);
|
||||||
parse_string (pfile, result, c);
|
parse_string (pfile, result, c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buffer->cur = pos;
|
buffer->cur = pos;
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
|
|
||||||
start_ident:
|
start_ident:
|
||||||
case '_':
|
case '_':
|
||||||
@ -1091,7 +1091,7 @@ _cpp_lex_direct (pfile)
|
|||||||
&& ! buffer->warned_cplusplus_comments)
|
&& ! buffer->warned_cplusplus_comments)
|
||||||
{
|
{
|
||||||
cpp_error (pfile, DL_PEDWARN,
|
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,
|
cpp_error (pfile, DL_PEDWARN,
|
||||||
"(this will be reported only once per input file)");
|
"(this will be reported only once per input file)");
|
||||||
buffer->warned_cplusplus_comments = 1;
|
buffer->warned_cplusplus_comments = 1;
|
||||||
@ -1799,33 +1799,33 @@ cpp_parse_escape (pfile, pstr, limit, wide)
|
|||||||
cpp_error (pfile, DL_WARNING,
|
cpp_error (pfile, DL_WARNING,
|
||||||
"the meaning of '\\x' is different in traditional C");
|
"the meaning of '\\x' is different in traditional C");
|
||||||
|
|
||||||
{
|
{
|
||||||
cppchar_t i = 0, overflow = 0;
|
cppchar_t i = 0, overflow = 0;
|
||||||
int digits_found = 0;
|
int digits_found = 0;
|
||||||
|
|
||||||
while (str < limit)
|
while (str < limit)
|
||||||
{
|
{
|
||||||
c = *str;
|
c = *str;
|
||||||
if (! ISXDIGIT (c))
|
if (! ISXDIGIT (c))
|
||||||
break;
|
break;
|
||||||
str++;
|
str++;
|
||||||
overflow |= i ^ (i << 4 >> 4);
|
overflow |= i ^ (i << 4 >> 4);
|
||||||
i = (i << 4) + hex_digit_value (c);
|
i = (i << 4) + hex_digit_value (c);
|
||||||
digits_found = 1;
|
digits_found = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!digits_found)
|
if (!digits_found)
|
||||||
cpp_error (pfile, DL_ERROR,
|
cpp_error (pfile, DL_ERROR,
|
||||||
"\\x used with no following hex digits");
|
"\\x used with no following hex digits");
|
||||||
|
|
||||||
if (overflow | (i != (i & mask)))
|
if (overflow | (i != (i & mask)))
|
||||||
{
|
{
|
||||||
cpp_error (pfile, DL_PEDWARN,
|
cpp_error (pfile, DL_PEDWARN,
|
||||||
"hex escape sequence out of range");
|
"hex escape sequence out of range");
|
||||||
i &= mask;
|
i &= mask;
|
||||||
}
|
}
|
||||||
c = i;
|
c = i;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '0': case '1': case '2': case '3':
|
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
|
requested to expand comments into macros, then re-enable
|
||||||
saving of comments. */
|
saving of comments. */
|
||||||
if (dir == &dtable[T_DEFINE])
|
if (dir == &dtable[T_DEFINE])
|
||||||
pfile->state.save_comments =
|
pfile->state.save_comments =
|
||||||
! CPP_OPTION (pfile, discard_comments_in_macro_exp);
|
! CPP_OPTION (pfile, discard_comments_in_macro_exp);
|
||||||
|
|
||||||
pfile->directive = dir;
|
pfile->directive = dir;
|
||||||
(*pfile->directive->handler) (pfile);
|
(*pfile->directive->handler) (pfile);
|
||||||
|
@ -1584,9 +1584,9 @@ cpp_macro_definition (pfile, node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i + 1 < macro->paramc)
|
if (i + 1 < macro->paramc)
|
||||||
/* Don't emit a space after the comma here; we're trying
|
/* Don't emit a space after the comma here; we're trying
|
||||||
to emit a Dwarf-friendly definition, and the Dwarf spec
|
to emit a Dwarf-friendly definition, and the Dwarf spec
|
||||||
forbids spaces in the argument list. */
|
forbids spaces in the argument list. */
|
||||||
*buffer++ = ',';
|
*buffer++ = ',';
|
||||||
else if (macro->variadic)
|
else if (macro->variadic)
|
||||||
*buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
|
*buffer++ = '.', *buffer++ = '.', *buffer++ = '.';
|
||||||
|
Loading…
Reference in New Issue
Block a user