summaryrefslogtreecommitdiffstats
path: root/gcc/cp
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-01 04:55:32 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-01 04:55:32 +0000
commitb5262297911b32f18d02fbf1e79df0a404cb182c (patch)
tree4365b2760e10f767d99a2ec155b57e49ba8c4f83 /gcc/cp
parente815d37d0ff358d4678f1e157804e9a520407a77 (diff)
downloadppe42-gcc-b5262297911b32f18d02fbf1e79df0a404cb182c.tar.gz
ppe42-gcc-b5262297911b32f18d02fbf1e79df0a404cb182c.zip
PR c++/26660
* parser.c (cp_parser_initial_pragma): Read one more token for caller after reading PCH file in. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eaa96a5a772..0d91aed04b0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-01 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/26660
+ * parser.c (cp_parser_initial_pragma): Read one more token for
+ caller after reading PCH file in.
+
2006-05-31 Mark Mitchell <mark@codesourcery.com>
PR c++/27801
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 98d4c5eedb9..0628b22d80c 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -19006,12 +19006,14 @@ cp_parser_initial_pragma (cp_token *first_token)
while (first_token->type != CPP_PRAGMA_EOL && first_token->type != CPP_EOF)
cp_lexer_get_preprocessor_token (NULL, first_token);
- /* Read one more token to return to our caller. */
- cp_lexer_get_preprocessor_token (NULL, first_token);
-
/* Now actually load the PCH file. */
if (name)
c_common_pch_pragma (parse_in, TREE_STRING_POINTER (name));
+
+ /* Read one more token to return to our caller. We have to do this
+ after reading the PCH file in, since its pointers have to be
+ live. */
+ cp_lexer_get_preprocessor_token (NULL, first_token);
}
/* Normal parsing of a pragma token. Here we can (and must) use the
OpenPOWER on IntegriCloud