re PR preprocessor/27746 (ICE on openmp code when using _Pragma from macro)

PR preprocessor/27746
	* directives.c (do_pragma): Handle pragma with valid namespace
	and invalid name coming from macro expansion.
	* directives.c (destringize_and_run): Initialize next field in
	context.

	PR c/27747
	PR c++/27748
	* directives.c (destringize_and_run): Set NO_EXPAND on the
	tokens.

	* macro.c (_cpp_backup_tokens): Fix comment typo.
testsuite/
	PR c/27747
	* gcc.dg/cpp/_Pragma6.c: New test.

	PR c++/27748
	* g++.dg/cpp/_Pragma1.C: New test.

	PR preprocessor/27746
	* gcc.dg/gomp/macro-3.c: New test.
	* gcc.dg/gomp/macro-4.c: New test.
	* g++.dg/gomp/macro-3.C: New test.
	* g++.dg/gomp/macro-4.C: New test.

From-SVN: r114519
This commit is contained in:
Jakub Jelinek 2006-06-09 23:13:25 +02:00 committed by Jakub Jelinek
parent 549fb079d3
commit 1c90c6f9c0
10 changed files with 181 additions and 3 deletions

View file

@ -1180,7 +1180,7 @@ cpp_scan_nooutput (cpp_reader *pfile)
pfile->state.prevent_expansion--;
}
/* Step back one (or more) tokens. Can only step mack more than 1 if
/* Step back one (or more) tokens. Can only step back more than 1 if
they are from the lexer, and not from macro expansion. */
void
_cpp_backup_tokens (cpp_reader *pfile, unsigned int count)