From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>
Subject: [patch] add test for PR c++/33840
Date: Sat, 04 Jun 2011 13:00:00 -0000 [thread overview]
Message-ID: <BANLkTi=NirP0XYgu_-k1WjKJ-DWu2p2NYQ@mail.gmail.com> (raw)
[-- 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 }
next reply other threads:[~2011-06-04 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 13:00 Jonathan Wakely [this message]
2011-06-04 15:50 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=NirP0XYgu_-k1WjKJ-DWu2p2NYQ@mail.gmail.com' \
--to=jwakely.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).