diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-16 22:03:57 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-16 22:03:57 +0000 |
commit | 69201cc54f32a32d8ae557c53a842b6cc433fa6f (patch) | |
tree | 4dad368ffbb848e76f56389d55cf3556c99430a4 /gcc/cp/lex.c | |
parent | 2c5fdb6399e276044e86bb4bf2413521e3500593 (diff) | |
download | gcc-69201cc54f32a32d8ae557c53a842b6cc433fa6f.tar.gz |
PR c++/37532
* lex.c (init_reswords): Don't populate ridpointers for D_CONLY
reserved words.
* g++.dg/parse/crash46.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index d5ddce88aef..d708b09658b 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -172,7 +172,6 @@ init_reswords (void) tree id; int mask = 0; - mask |= D_CONLY; if (cxx_dialect != cxx0x) mask |= D_CXX0X; if (flag_no_asm) @@ -186,6 +185,8 @@ init_reswords (void) ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX); for (i = 0; i < num_c_common_reswords; i++) { + if (c_common_reswords[i].disable & D_CONLY) + continue; id = get_identifier (c_common_reswords[i].word); C_SET_RID_CODE (id, c_common_reswords[i].rid); ridpointers [(int) c_common_reswords[i].rid] = id; |