diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-07-08 02:33:00 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-07-08 02:33:00 +0000 |
commit | cf00a885103d939b2175adc8918908a3b6f211d2 (patch) | |
tree | 063609848f321cdd31d0d1155b156f5af32e889c /gcc/testsuite/gcc.dg/cpp | |
parent | 563dd08adfa12573fdecf9669fdf685fef5fd360 (diff) | |
download | gcc-cf00a885103d939b2175adc8918908a3b6f211d2.zip gcc-cf00a885103d939b2175adc8918908a3b6f211d2.tar.gz gcc-cf00a885103d939b2175adc8918908a3b6f211d2.tar.bz2 |
cppexp.c: Update all code for new lexer interface.
* cppexp.c: Update all code for new lexer interface.
(op_t, operator codes, struct token, tokentab2, op_to_str): Remove.
(struct suffix, vsuf_1, vsuf_2, vsuf_3, op_to_prio): New.
* cpplex.c (token_names): Trim leading CPP_ from names; make
the strings unsigned.
(_cpp_spell_operator): New.
(is_macro_disabled): Disable all macros if rescanning
preprocessed text.
(_cpp_get_directive_token): Remove.
* cppinit.c: Don't set no_macro_expand.
* cpplib.c (read_line_number, do_line): Check only for EOF,
not VSPACE.
* cpphash.h: Update prototypes.
* cpplib.h (CPP_VSPACE): Remove.
(struct cpp_reader): Remove no_macro_expand.
testsuite:
* gcc.dg/cpp/19951227-1.c, gcc.dg/cpp/assert2.c,
gcc.dg/cpp/if-1.c, gcc.dg/cpp/if-4.c: Tweak error regexps.
From-SVN: r34920
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/19951227-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/assert2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/if-1.c | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/if-4.c | 2 |
4 files changed, 15 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/19951227-1.c b/gcc/testsuite/gcc.dg/cpp/19951227-1.c index 0d8fcfd..da2f6d851 100644 --- a/gcc/testsuite/gcc.dg/cpp/19951227-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19951227-1.c @@ -1,3 +1,3 @@ /* { dg-do preprocess } */ -#if 0xe-1 /* { dg-error "invalid number" } */ +#if 0xe-1 /* { dg-error "invalid suffix" } */ #endif diff --git a/gcc/testsuite/gcc.dg/cpp/assert2.c b/gcc/testsuite/gcc.dg/cpp/assert2.c index 26d3aad..bdbf85d 100644 --- a/gcc/testsuite/gcc.dg/cpp/assert2.c +++ b/gcc/testsuite/gcc.dg/cpp/assert2.c @@ -20,5 +20,5 @@ #error /* { dg-bogus "error" "test w/o answer" } */ #endif -#if #abc[def] /* { dg-error "invalid char" "test with malformed answer" } */ +#if #abc[def] /* { dg-error "is not valid" "test with malformed answer" } */ #endif diff --git a/gcc/testsuite/gcc.dg/cpp/if-1.c b/gcc/testsuite/gcc.dg/cpp/if-1.c index 9b7c8d3..863fa90 100644 --- a/gcc/testsuite/gcc.dg/cpp/if-1.c +++ b/gcc/testsuite/gcc.dg/cpp/if-1.c @@ -9,22 +9,29 @@ #error 077 != 63 /* { dg-bogus "#error" "normal conversion" } */ #endif -#if 12wrt /* { dg-error "nvalid number|missing white" "invalid number" } */ +#if 12wrt /* { dg-error "invalid suffix" "invalid number" } */ #endif -#if 0abc /* { dg-error "nvalid number|missing white" "invalid number" } */ +#if 0abc /* { dg-error "invalid suffix" "invalid number" } */ #endif -#if 42abc /* { dg-error "nvalid number|missing white" "invalid number" } */ +#if 42abc /* { dg-error "invalid suffix" "invalid number" } */ +#endif + +#if 0xabc != 2748 +#error 0xabc /* { dg-bogus "#error" "normal conversion" } */ #endif #if 1.2 /* { dg-error "loating point numbers" "floating point in #if" } */ #endif -#if 4uu /* { dg-error "too many 'u'" "too many suffixes" } */ +#if 4uu /* { dg-error "invalid suffix" "too many suffixes" } */ +#endif + +#if 124123231lll /* { dg-error "invalid suffix" "too many suffixes" } */ #endif -#if 124123231lll /* { dg-error "too many 'l'" "too many suffixes" } */ +#if 1234lul /* { dg-error "invalid suffix" "u between ls" } */ #endif #if 099 /* { dg-error "digits beyond the radix" "decimal in octal constant" } */ diff --git a/gcc/testsuite/gcc.dg/cpp/if-4.c b/gcc/testsuite/gcc.dg/cpp/if-4.c index 84764fb..a39c11d 100644 --- a/gcc/testsuite/gcc.dg/cpp/if-4.c +++ b/gcc/testsuite/gcc.dg/cpp/if-4.c @@ -2,7 +2,7 @@ NUL terminated, so we would print garbage after it. */ /* { dg-do compile } */ -#if 1 += 2 /* { dg-error "'\\+=' is not allowed" "+= in if" } */ +#if 1 += 2 /* { dg-error "'\\+=' is not valid" "+= in if" } */ syntax_error #endif int foo; |