* [patch] add test for PR c++/33840
@ 2011-06-04 13:00 Jonathan Wakely
2011-06-04 15:50 ` Jason Merrill
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2011-06-04 13:00 UTC (permalink / raw)
To: gcc-patches, Jason Merrill
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
The code in the PR is correctly rejected now, this adds a test to
prevent regressions so the PR can be closed.
2011-06-04 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/33840
* g++.dg/diagnostic/bitfld2.C: New.
Tested x86_64-linux, ok for trunk and 4.6?
[-- Attachment #2: 33840.txt --]
[-- Type: text/plain, Size: 513 bytes --]
Index: testsuite/g++.dg/diagnostic/bitfld2.C
===================================================================
--- testsuite/g++.dg/diagnostic/bitfld2.C (revision 0)
+++ testsuite/g++.dg/diagnostic/bitfld2.C (revision 0)
@@ -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 }
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] add test for PR c++/33840
2011-06-04 13:00 [patch] add test for PR c++/33840 Jonathan Wakely
@ 2011-06-04 15:50 ` Jason Merrill
0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2011-06-04 15:50 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches
OK.
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-04 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-04 13:00 [patch] add test for PR c++/33840 Jonathan Wakely
2011-06-04 15:50 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).