diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2003-11-01 22:56:54 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2003-11-01 22:56:54 +0000 |
commit | 0527bc4ebf78a3e1ae984f978fb4f7118a180add (patch) | |
tree | 968c051f5c6b85312c57b38b07efd46743674b3b /gcc/cppcharset.c | |
parent | 2f7b62efc51dd853ab5fa6e36cc0d15c831d6796 (diff) | |
download | gcc-0527bc4ebf78a3e1ae984f978fb4f7118a180add.zip gcc-0527bc4ebf78a3e1ae984f978fb4f7118a180add.tar.gz gcc-0527bc4ebf78a3e1ae984f978fb4f7118a180add.tar.bz2 |
re PR preprocessor/12847 (xxx.c:1:20: xxxx.h: No such file or directory)
PR preprocessor/12847
* cppfiles.c, cppexp.c, cpperror.c, cpplib.h, cpplib.c, cpplex.c,
cppinit.c, cpptrad.c, cppmacro.c, fix-header.c, cpppch.c, c-pch.c,
c-incpath.c, cppcharset.c (DL_WARNING, DL_WARNING_SYSHDR, DL_PEDWARN,
DL_ERROR, DL_ICE, DL_EXTRACT, DL_WARNING_P): Prefix macro names with
"CPP_".
From-SVN: r73183
Diffstat (limited to 'gcc/cppcharset.c')
-rw-r--r-- | gcc/cppcharset.c | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/gcc/cppcharset.c b/gcc/cppcharset.c index e305704..6b69fed 100644 --- a/gcc/cppcharset.c +++ b/gcc/cppcharset.c @@ -649,18 +649,18 @@ init_iconv_desc (cpp_reader *pfile, const char *to, const char *from) if (ret.cd == (iconv_t) -1) { if (errno == EINVAL) - cpp_error (pfile, DL_ERROR, /* XXX should be DL_SORRY */ + cpp_error (pfile, CPP_DL_ERROR, /* XXX should be DL_SORRY */ "conversion from %s to %s not supported by iconv", from, to); else - cpp_errno (pfile, DL_ERROR, "iconv_open"); + cpp_errno (pfile, CPP_DL_ERROR, "iconv_open"); ret.func = convert_no_conversion; } } else { - cpp_error (pfile, DL_ERROR, /* XXX should be DL_SORRY */ + cpp_error (pfile, CPP_DL_ERROR, /* XXX should be DL_SORRY */ "no iconv implementation, cannot convert from %s to %s", from, to); ret.func = convert_no_conversion; @@ -804,10 +804,10 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, const uchar *base = str - 2; if (!CPP_OPTION (pfile, cplusplus) && !CPP_OPTION (pfile, c99)) - cpp_error (pfile, DL_WARNING, + cpp_error (pfile, CPP_DL_WARNING, "universal character names are only valid in C++ and C99"); else if (CPP_WTRADITIONAL (pfile) && identifier_pos == 0) - cpp_error (pfile, DL_WARNING, + cpp_error (pfile, CPP_DL_WARNING, "the meaning of '\\%c' is different in traditional C", (int) str[-1]); @@ -833,7 +833,8 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, if (length) { /* We'll error when we try it out as the start of an identifier. */ - cpp_error (pfile, DL_ERROR, "incomplete universal character name %.*s", + cpp_error (pfile, CPP_DL_ERROR, + "incomplete universal character name %.*s", (int) (str - base), base); result = 1; } @@ -844,7 +845,8 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, || (result & 0x80000000) || (result >= 0xD800 && result <= 0xDFFF)) { - cpp_error (pfile, DL_ERROR, "%.*s is not a valid universal character", + cpp_error (pfile, CPP_DL_ERROR, + "%.*s is not a valid universal character", (int) (str - base), base); result = 1; } @@ -853,11 +855,11 @@ _cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, int validity = ucn_valid_in_identifier (pfile, result); if (validity == 0) - cpp_error (pfile, DL_ERROR, + cpp_error (pfile, CPP_DL_ERROR, "universal character %.*s is not valid in an identifier", (int) (str - base), base); else if (validity == 2 && identifier_pos == 1) - cpp_error (pfile, DL_ERROR, + cpp_error (pfile, CPP_DL_ERROR, "universal character %.*s is not valid at the start of an identifier", (int) (str - base), base); } @@ -892,10 +894,12 @@ convert_ucn (cpp_reader *pfile, const uchar *from, const uchar *limit, if (rval) { errno = rval; - cpp_errno (pfile, DL_ERROR, "converting UCN to source character set"); + cpp_errno (pfile, CPP_DL_ERROR, + "converting UCN to source character set"); } else if (!APPLY_CONVERSION (cvt, buf, 6 - bytesleft, tbuf)) - cpp_errno (pfile, DL_ERROR, "converting UCN to execution character set"); + cpp_errno (pfile, CPP_DL_ERROR, + "converting UCN to execution character set"); return from; } @@ -959,7 +963,7 @@ convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, size_t mask = width_to_mask (width); if (CPP_WTRADITIONAL (pfile)) - cpp_error (pfile, DL_WARNING, + cpp_error (pfile, CPP_DL_WARNING, "the meaning of '\\x' is different in traditional C"); from++; /* skip 'x' */ @@ -976,14 +980,14 @@ convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, if (!digits_found) { - cpp_error (pfile, DL_ERROR, + cpp_error (pfile, CPP_DL_ERROR, "\\x used with no following hex digits"); return from; } if (overflow | (n != (n & mask))) { - cpp_error (pfile, DL_PEDWARN, + cpp_error (pfile, CPP_DL_PEDWARN, "hex escape sequence out of range"); n &= mask; } @@ -1022,7 +1026,7 @@ convert_oct (cpp_reader *pfile, const uchar *from, const uchar *limit, if (n != (n & mask)) { - cpp_error (pfile, DL_PEDWARN, + cpp_error (pfile, CPP_DL_PEDWARN, "octal escape sequence out of range"); n &= mask; } @@ -1090,14 +1094,14 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, case 'a': if (CPP_WTRADITIONAL (pfile)) - cpp_error (pfile, DL_WARNING, + cpp_error (pfile, CPP_DL_WARNING, "the meaning of '\\a' is different in traditional C"); c = charconsts[0]; break; case 'e': case 'E': if (CPP_PEDANTIC (pfile)) - cpp_error (pfile, DL_PEDWARN, + cpp_error (pfile, CPP_DL_PEDWARN, "non-ISO-standard escape sequence, '\\%c'", (int) c); c = charconsts[2]; break; @@ -1105,16 +1109,16 @@ convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, default: unknown: if (ISGRAPH (c)) - cpp_error (pfile, DL_PEDWARN, + cpp_error (pfile, CPP_DL_PEDWARN, "unknown escape sequence '\\%c'", (int) c); else - cpp_error (pfile, DL_PEDWARN, + cpp_error (pfile, CPP_DL_PEDWARN, "unknown escape sequence: '\\%03o'", (int) c); } /* Now convert what we have to the execution character set. */ if (!APPLY_CONVERSION (cvt, &c, 1, tbuf)) - cpp_errno (pfile, DL_ERROR, + cpp_errno (pfile, CPP_DL_ERROR, "converting escape sequence to execution character set"); return from + 1; @@ -1174,7 +1178,7 @@ cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count, return true; fail: - cpp_errno (pfile, DL_ERROR, "converting to execution character set"); + cpp_errno (pfile, CPP_DL_ERROR, "converting to execution character set"); free (tbuf.text); return false; } @@ -1236,10 +1240,11 @@ narrow_str_to_charconst (cpp_reader *pfile, cpp_string str, if (i > max_chars) { i = max_chars; - cpp_error (pfile, DL_WARNING, "character constant too long for its type"); + cpp_error (pfile, CPP_DL_WARNING, + "character constant too long for its type"); } else if (i > 1 && CPP_OPTION (pfile, warn_multichar)) - cpp_error (pfile, DL_WARNING, "multi-character character constant"); + cpp_error (pfile, CPP_DL_WARNING, "multi-character character constant"); /* Multichar constants are of type int and therefore signed. */ if (i > 1) @@ -1298,7 +1303,8 @@ wide_str_to_charconst (cpp_reader *pfile, cpp_string str, character exactly fills a wchar_t, so a multi-character wide character constant is guaranteed to overflow. */ if (off > 0) - cpp_error (pfile, DL_WARNING, "character constant too long for its type"); + cpp_error (pfile, CPP_DL_WARNING, + "character constant too long for its type"); /* Truncate the constant to its natural width, and simultaneously sign- or zero-extend to the full width of cppchar_t. */ @@ -1330,7 +1336,7 @@ cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token, /* an empty constant will appear as L'' or '' */ if (token->val.str.len == (size_t) (2 + wide)) { - cpp_error (pfile, DL_ERROR, "empty character constant"); + cpp_error (pfile, CPP_DL_ERROR, "empty character constant"); return 0; } else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, wide)) |