gcc/libcpp
Joseph Myers aa50850225 re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions)
libcpp:
	PR preprocessor/20078
	* include/cpp-id-data.h (struct cpp_macro): Add extra_tokens
	field.
	* include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define.
	(struct cpp_token): Change flags to unsigned short.
	* lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens.
	(_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens.
	(cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE
	tokens.
	* macro.c (macro_real_token_count): New.
	(enter_macro_context, replace_args): Use macro_real_token_count.
	(create_iso_definition): Record whitespace surrounding and digraph
	spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH.
	Set extra_tokens and save CPP_PASTE tokens with arg_no set for
	multiple consecutive ## tokens.
	(_cpp_create_definition): Initialize extra_tokens.
	(cpp_macro_definition): Use macro_real_token_count.

gcc/testsuite:
	* gcc.dg/cpp/paste16.c, gcc.dg/cpp/redef4.c: New tests.

From-SVN: r146352
2009-04-19 18:10:56 +01:00
..
include re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions) 2009-04-19 18:10:56 +01:00
po * cpplib.pot: Regenerate. 2009-03-28 06:57:06 +00:00
aclocal.m4 re PR other/35457 (Error building GCC trunk on CELL SPU) 2008-04-18 10:28:53 +00:00
ChangeLog re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions) 2009-04-19 18:10:56 +01:00
charset.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
config.in re PR preprocessor/31932 (cpp -f*-charset and gcj --encoding accept no values except UTF-8) 2009-03-30 20:54:18 +00:00
configure re PR preprocessor/31932 (cpp -f*-charset and gcj --encoding accept no values except UTF-8) 2009-03-30 20:54:18 +00:00
configure.ac re PR preprocessor/31932 (cpp -f*-charset and gcj --encoding accept no values except UTF-8) 2009-03-30 20:54:18 +00:00
directives-only.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
directives.c directives.c (parse_include): Pass true to check_eol. 2009-04-18 21:25:07 +01:00
errors.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
expr.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
files.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
identifiers.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
init.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
internal.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
lex.c re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions) 2009-04-19 18:10:56 +01:00
line-map.c re PR preprocessor/39646 (__FILE__ breaks for empty file name) 2009-04-18 18:36:28 +01:00
macro.c re PR preprocessor/20078 (Gcc doesn't complain about non-benign macro definitions) 2009-04-19 18:10:56 +01:00
Makefile.in Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
makeucnid.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
mkdeps.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
pch.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
symtab.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
system.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
traditional.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ucnid.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ucnid.tab Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00