aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-09-17 00:03:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-09-17 00:03:57 +0200
commit08222495cc9ea47746057e95002b7a467309964c (patch)
tree4dad368ffbb848e76f56389d55cf3556c99430a4 /gcc/cp
parenta8d0ab1d2406d0bb5f605e1b70be3c2d5c9fbd9b (diff)
downloadgcc-08222495cc9ea47746057e95002b7a467309964c.zip
gcc-08222495cc9ea47746057e95002b7a467309964c.tar.gz
gcc-08222495cc9ea47746057e95002b7a467309964c.tar.bz2
re PR c++/37532 (ICE with decimal floating point data types)
PR c++/37532 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY reserved words. * g++.dg/parse/crash46.C: New test. From-SVN: r140399
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/lex.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5b36ffc..1bc8596 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/37532
+ * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
+ reserved words.
+
2008-09-15 Aldy Hernandez <aldyh@redhat.com>
* decl.c (duplicate_decls): Call error_at.
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index d5ddce8..d708b09 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;