aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 3701415..783732f 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -270,12 +270,12 @@ _cpp_process_line_notes (cpp_reader *pfile, int in_comment)
if (note->type == '\\' || note->type == ' ')
{
if (note->type == ' ' && !in_comment)
- cpp_error_with_line (pfile, DL_WARNING, pfile->line, col,
+ cpp_error_with_line (pfile, CPP_DL_WARNING, pfile->line, col,
"backslash and newline separated by space");
if (buffer->next_line > buffer->rlimit)
{
- cpp_error_with_line (pfile, DL_PEDWARN, pfile->line, col,
+ cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line, col,
"backslash-newline at end of file");
/* Prevent "no newline at end of file" warning. */
buffer->next_line = buffer->rlimit;
@@ -290,14 +290,14 @@ _cpp_process_line_notes (cpp_reader *pfile, int in_comment)
&& (!in_comment || warn_in_comment (pfile, note)))
{
if (CPP_OPTION (pfile, trigraphs))
- cpp_error_with_line (pfile, DL_WARNING, pfile->line, col,
+ cpp_error_with_line (pfile, CPP_DL_WARNING, pfile->line, col,
"trigraph ??%c converted to %c",
note->type,
(int) _cpp_trigraph_map[note->type]);
else
{
cpp_error_with_line
- (pfile, DL_WARNING, pfile->line, col,
+ (pfile, CPP_DL_WARNING, pfile->line, col,
"trigraph ??%c ignored, use -trigraphs to enable",
note->type);
}
@@ -342,7 +342,7 @@ _cpp_skip_block_comment (cpp_reader *pfile)
&& cur[0] == '*' && cur[1] != '/')
{
buffer->cur = cur;
- cpp_error_with_line (pfile, DL_WARNING,
+ cpp_error_with_line (pfile, CPP_DL_WARNING,
pfile->line, CPP_BUF_COL (buffer),
"\"/*\" within comment");
}
@@ -396,7 +396,7 @@ skip_whitespace (cpp_reader *pfile, cppchar_t c)
else if (c == '\0')
saw_NUL = true;
else if (pfile->state.in_directive && CPP_PEDANTIC (pfile))
- cpp_error_with_line (pfile, DL_PEDWARN, pfile->line,
+ cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line,
CPP_BUF_COL (buffer),
"%s in preprocessing directive",
c == '\f' ? "form feed" : "vertical tab");
@@ -407,7 +407,7 @@ skip_whitespace (cpp_reader *pfile, cppchar_t c)
while (is_nvspace (c));
if (saw_NUL)
- cpp_error (pfile, DL_WARNING, "null character(s) ignored");
+ cpp_error (pfile, CPP_DL_WARNING, "null character(s) ignored");
buffer->cur--;
}
@@ -442,7 +442,7 @@ forms_identifier_p (cpp_reader *pfile, int first)
if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping)
{
CPP_OPTION (pfile, warn_dollars) = 0;
- cpp_error (pfile, DL_PEDWARN, "'$' in identifier or number");
+ cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number");
}
return true;
@@ -489,14 +489,14 @@ lex_identifier (cpp_reader *pfile, const uchar *base)
{
/* It is allowed to poison the same identifier twice. */
if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok)
- cpp_error (pfile, DL_ERROR, "attempt to use poisoned \"%s\"",
+ cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned \"%s\"",
NODE_NAME (result));
/* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the
replacement list of a variadic macro. */
if (result == pfile->spec_nodes.n__VA_ARGS__
&& !pfile->state.va_args_ok)
- cpp_error (pfile, DL_PEDWARN,
+ cpp_error (pfile, CPP_DL_PEDWARN,
"__VA_ARGS__ can only appear in the expansion"
" of a C99 variadic macro");
}
@@ -592,7 +592,8 @@ lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
}
if (saw_NUL && !pfile->state.skipping)
- cpp_error (pfile, DL_WARNING, "null character(s) preserved in literal");
+ cpp_error (pfile, CPP_DL_WARNING,
+ "null character(s) preserved in literal");
pfile->buffer->cur = cur;
create_literal (pfile, token, base, cur - base, type);
@@ -771,7 +772,7 @@ _cpp_get_fresh_line (cpp_reader *pfile)
{
/* Only warn once. */
buffer->next_line = buffer->rlimit;
- cpp_error_with_line (pfile, DL_PEDWARN, pfile->line - 1,
+ cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line - 1,
CPP_BUF_COLUMN (buffer, buffer->cur),
"no newline at end of file");
}
@@ -912,7 +913,7 @@ _cpp_lex_direct (cpp_reader *pfile)
if (c == '*')
{
if (_cpp_skip_block_comment (pfile))
- cpp_error (pfile, DL_ERROR, "unterminated comment");
+ cpp_error (pfile, CPP_DL_ERROR, "unterminated comment");
}
else if (c == '/' && (CPP_OPTION (pfile, cplusplus_comments)
|| CPP_IN_SYSTEM_HEADER (pfile)))
@@ -922,15 +923,15 @@ _cpp_lex_direct (cpp_reader *pfile)
if (CPP_OPTION (pfile, lang) == CLK_GNUC89 && CPP_PEDANTIC (pfile)
&& ! buffer->warned_cplusplus_comments)
{
- cpp_error (pfile, DL_PEDWARN,
+ cpp_error (pfile, CPP_DL_PEDWARN,
"C++ style comments are not allowed in ISO C90");
- cpp_error (pfile, DL_PEDWARN,
+ cpp_error (pfile, CPP_DL_PEDWARN,
"(this will be reported only once per input file)");
buffer->warned_cplusplus_comments = 1;
}
if (skip_line_comment (pfile) && CPP_OPTION (pfile, warn_comments))
- cpp_error (pfile, DL_WARNING, "multi-line comment");
+ cpp_error (pfile, CPP_DL_WARNING, "multi-line comment");
}
else if (c == '=')
{
@@ -1193,7 +1194,8 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
break;
case SPELL_NONE:
- cpp_error (pfile, DL_ICE, "unspellable token %s", TOKEN_NAME (token));
+ cpp_error (pfile, CPP_DL_ICE,
+ "unspellable token %s", TOKEN_NAME (token));
break;
}