gcc/libcpp
Jakub Jelinek 765d600ac5 re PR preprocessor/34692 (Internal error with pragma in macro)
PR preprocessor/34692
	* macro.c (collect_args): Add pragma_buff argument.  Push
	CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
	than into arguments.  Reset prevent_expansion and parsing_args
	state at CPP_PRAGMA_EOL/CPP_EOF.
	(funlike_invocation_p): Add pragma_buff argument, pass it through
	to collect_args.
	(enter_macro_context): Add result argument.  Adjust
	funlike_invocation_p caller.  Emit all deferred pragma tokens
	gathered during collect_args before the expansion, add a padding
	token.  Return 2 instead of 1 if any pragma tokens were prepended.
	(cpp_get_token): If enter_macro_context returns 2, don't return
	a padding token, instead cycle to grab CPP_PRAGMA token.
	* directives.c (_cpp_handle_directive): If was_parsing_args
	in deferred pragma, leave parsing_args and prevent_expansion as is.

	* gcc.dg/cpp/pr34692.c: New test.
	* gcc.dg/gomp/pr34692.c: New test.

From-SVN: r131819
2008-01-25 10:01:27 +01:00
..
include re PR c/29172 (--combine can't handle #pragma once) 2007-12-06 18:56:26 +00:00
po * sv.po: Update. 2008-01-20 14:53:58 +00:00
ChangeLog re PR preprocessor/34692 (Internal error with pragma in macro) 2008-01-25 10:01:27 +01:00
Makefile.in directives-only.c: New file. 2007-07-30 18:29:20 +00:00
aclocal.m4 top level: 2005-06-13 08:26:05 +00:00
charset.c charset.c (convert_using_iconv): Close out any shift states, returning to the initial state. 2007-12-11 20:38:10 -05:00
config.in ( 5) 2007-12-03 21:04:47 +00:00
configure ( 5) 2007-12-03 21:04:47 +00:00
configure.ac ( 5) 2007-12-03 21:04:47 +00:00
directives-only.c directives-only.c: New file. 2007-07-30 18:29:20 +00:00
directives.c re PR preprocessor/34692 (Internal error with pragma in macro) 2008-01-25 10:01:27 +01:00
errors.c cp-tree.h (cp_cpp_error), [...]): Take va_list* parameter. 2005-11-04 01:16:32 +00:00
expr.c expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk. 2007-08-30 23:05:17 +00:00
files.c re PR c/29172 (--combine can't handle #pragma once) 2007-12-06 18:56:26 +00:00
identifiers.c all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
init.c tree-cfg.c (remove_bb): Only warn if line is non-zero. 2007-09-06 16:24:05 +00:00
internal.h re PR c/29172 (--combine can't handle #pragma once) 2007-12-06 18:56:26 +00:00
lex.c re PR preprocessor/14331 (please add option to suppress warning message "no newline at end of file") 2007-05-31 02:06:48 +00:00
line-map.c tree-cfg.c (remove_bb): Only warn if line is non-zero. 2007-09-06 16:24:05 +00:00
macro.c re PR preprocessor/34692 (Internal error with pragma in macro) 2008-01-25 10:01:27 +01:00
makedepend.c all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
makeucnid.c all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
mkdeps.c re PR preprocessor/30468 (-M not fully chops dirname) 2007-01-30 15:50:00 +00:00
pch.c Fixup whitespacing 2007-06-01 02:12:37 +00:00
symtab.c all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
system.h all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
traditional.c re PR preprocessor/30363 (Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3) 2008-01-07 17:23:40 +00:00
ucnid.h all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00
ucnid.tab all files: Update FSF address in copyright headers. 2005-06-29 02:34:39 +00:00