re PR c++/33840 (bit-field size accepted for struct)

2011-06-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR c++/33840
	* g++.dg/diagnostic/bitfld2.C: New.

From-SVN: r174642
This commit is contained in:
Jonathan Wakely 2011-06-04 16:11:41 +00:00 committed by Jonathan Wakely
parent 407bcba7b7
commit f90d37ec0c
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-06-04 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/33840
* g++.dg/diagnostic/bitfld2.C: New.
2011-06-04 Jakub Jelinek <jakub@redhat.com>
PR target/49281

View File

@ -0,0 +1,9 @@
// PR c++/33840
// { dg-do compile }
template<int> struct A
{
struct {} : 2; // { dg-error "expected ';' after struct" }
};
// { dg-error "ISO C.. forbids declaration" "" { target *-*-* } 6 }
// { dg-error "ISO C.. prohibits anonymous" "" { target *-*-* } 6 }