8sa1-gcc/gcc/testsuite/gcc.dg/cpp/if-1.c
Zack Weinberg cf00a88510 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
2000-07-08 02:33:00 +00:00

42 lines
1.0 KiB
C

/* { dg-do preprocess } */
/* { dg-options "-pedantic-errors" } */
#if 0xa != 10
#error 0xa != 10 /* { dg-bogus "#error" "normal conversion" } */
#endif
#if 077 != 63
#error 077 != 63 /* { dg-bogus "#error" "normal conversion" } */
#endif
#if 12wrt /* { dg-error "invalid suffix" "invalid number" } */
#endif
#if 0abc /* { dg-error "invalid suffix" "invalid number" } */
#endif
#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 "invalid suffix" "too many suffixes" } */
#endif
#if 124123231lll /* { dg-error "invalid suffix" "too many suffixes" } */
#endif
#if 1234lul /* { dg-error "invalid suffix" "u between ls" } */
#endif
#if 099 /* { dg-error "digits beyond the radix" "decimal in octal constant" } */
#endif
#if 0xfffffffffffffffff /* { dg-error "integer constant out of range" "range error" } */
#endif