From a11ed85ba193b8200c95d0844c6c38d0b591ec43 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Sat, 6 Nov 2004 20:01:42 +0000 Subject: * gcc.dg/anon-struct-6.c, gcc.dg/anon-struct-7.c, gcc.dg/anon-struct-8.c, gcc.dg/bitfld-10.c, gcc.dg/bitfld-11.c, gcc.dg/bitfld-12.c, gcc.dg/func-outside-1.c, gcc.dg/func-outside-2.c, gcc.dg/label-decl-1.c, gcc.dg/label-decl-2.c, gcc.dg/label-decl-3.c, gcc.dg/label-decl-4.c, gcc.dg/struct-empty-1.c, gcc.dg/struct-empty-2.c, gcc.dg/struct-empty-3.c, gcc.dg/struct-semi-1.c, gcc.dg/struct-semi-2.c, gcc.dg/struct-semi-3.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90193 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/bitfld-10.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/bitfld-10.c (limited to 'gcc/testsuite/gcc.dg/bitfld-10.c') diff --git a/gcc/testsuite/gcc.dg/bitfld-10.c b/gcc/testsuite/gcc.dg/bitfld-10.c new file mode 100644 index 00000000000..156929f49fd --- /dev/null +++ b/gcc/testsuite/gcc.dg/bitfld-10.c @@ -0,0 +1,8 @@ +/* Test for rejection of sizeof on bit-fields. */ +/* Origin: Joseph Myers */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +struct { int a : 1; } x; + +int r = sizeof (x.a); /* { dg-error "error: 'sizeof' applied to a bit-field" } */ -- cgit v1.2.1