gcc/libcpp
Dodji Seketeli 3ad64f53da Properly initialize cpp_context in destringize_and_run
destringize_and_run forgets to initialize all the fields of the
cpp_context that it pushes.  Later _cpp_pop_context then gets confused
when it accesses context->tokens_kind via the call to macro_of_context
on context->prev.

The first hunk of this patch is the real obvious fix.  The second hunk
is just an assert that I am adding to err on the safe side.

Tested by on x86_64-unknown-linux-gnu against trunk by running the
test gcc.dg/gomp/macro-4.c under Valgrind, and bootstrapped.

libcpp/

	* directives.c (destringize_and_run): Properly initialize the new
	context.
	* macro.c (_cpp_pop_context): Assert that we shouldn't try to pop
	the initial base context, which has the same life time as the
	current instance of cpp_file.

From-SVN: r187054
2012-05-02 18:55:19 +02:00
..
include Strip "<built-in>" loc from displayed expansion context 2012-04-30 13:42:12 +02:00
po * vi.po: Update. 2012-04-24 23:16:24 +01:00
aclocal.m4
ChangeLog Properly initialize cpp_context in destringize_and_run 2012-05-02 18:55:19 +02:00
charset.c
config.in
configure Add ports for TILE-Gx and TILEPro. 2012-02-14 10:02:21 +00:00
configure.ac Add ports for TILE-Gx and TILEPro. 2012-02-14 10:02:21 +00:00
directives-only.c
directives.c Properly initialize cpp_context in destringize_and_run 2012-05-02 18:55:19 +02:00
errors.c
expr.c
files.c re PR c++/52974 (Canonicalize include paths in diagnostics) 2012-04-30 16:57:22 +00:00
identifiers.c
init.c Switch -ftrack-macro-expansion=2 on by default. 2012-04-30 13:43:43 +02:00
internal.h re PR preprocessor/33919 (__BASE_FILE__ does not expand correctly when included from the command line) 2012-01-09 08:48:43 +00:00
lex.c Don't use C++ style comments in libcpp 2012-04-29 18:27:08 +02:00
line-map.c Strip "<built-in>" loc from displayed expansion context 2012-04-30 13:42:12 +02:00
macro.c Properly initialize cpp_context in destringize_and_run 2012-05-02 18:55:19 +02:00
Makefile.in
makeucnid.c
mkdeps.c
pch.c
symtab.c
system.h system.h: Prior to #define, #undef fopen and freopen unconditionally. 2012-01-03 11:44:34 +00:00
traditional.c
ucnid.h
ucnid.tab