diff options
| author | Mike Stump <mrs@apple.com> | 2005-01-31 22:05:07 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@gcc.gnu.org> | 2005-01-31 22:05:07 +0000 |
| commit | 3d8a8aade36871c292e4f374262e9946cb6aa83c (patch) | |
| tree | 23e04a3713ff8c299809b404d62cb8c9b197e1c4 /gcc/cp/parser.c | |
| parent | 9ea888348fda5bbe3f33ec2b241d7adb1c94383b (diff) | |
| download | gcc-3d8a8aade36871c292e4f374262e9946cb6aa83c.zip gcc-3d8a8aade36871c292e4f374262e9946cb6aa83c.tar.gz gcc-3d8a8aade36871c292e4f374262e9946cb6aa83c.tar.bz2 | |
parser.c (cp_lexer_new_main): Get the first token, first, before doing anything.
* parser.c (cp_lexer_new_main): Get the first token, first, before
doing anything.
Radar 3929334
From-SVN: r94494
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 1599d9c..ab2a103 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -238,16 +238,19 @@ cp_lexer_new_main (void) size_t space; cp_token *buffer; + /* It's possible that lexing the first token will load a PCH file, + which is a GC collection point. So we have to grab the first + token before allocating any memory. Pragmas must not be deferred + as -fpch-preprocess can generate a pragma to load the PCH file in + the preprocessed output used by -save-temps. */ + cp_lexer_get_preprocessor_token (NULL, &first_token); + /* Tell cpplib we want CPP_PRAGMA tokens. */ cpp_get_options (parse_in)->defer_pragmas = true; /* Tell c_lex not to merge string constants. */ c_lex_return_raw_strings = true; - /* It's possible that lexing the first token will load a PCH file, - which is a GC collection point. So we have to grab the first - token before allocating any memory. */ - cp_lexer_get_preprocessor_token (NULL, &first_token); c_common_no_more_pch (); /* Allocate the memory. */ |
