* 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
+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.
tree id;
int mask = 0;
- mask |= D_CONLY;
if (cxx_dialect != cxx0x)
mask |= D_CXX0X;
if (flag_no_asm)
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;
2008-09-16 Jakub Jelinek <jakub@redhat.com>
+ PR c++/37532
+ * g++.dg/parse/crash46.C: New test.
+
PR testsuite/36889
* lib/fortran-torture.exp (get-fortran-torture-options): Only
set test_tree_vectorize on i?86/x86_64 resp. sparc* if sse2 resp.
--- /dev/null
+// PR c++/37532
+// { dg-do compile }
+
+void
+foo (_Decimal32) // { dg-error "declared void" }
+{
+}
+ // { dg-error "was not declared" "" { target *-*-* } 5 }
+void
+bar (_Bool) // { dg-error "declared void" }
+{
+}
+ // { dg-error "was not declared" "" { target *-*-* } 10 }
+void
+baz (_Fract) // { dg-error "declared void" }
+{
+}
+ // { dg-error "was not declared" "" { target *-*-* } 15 }