Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: test GCC attributes in...



details:   https://anonhg.NetBSD.org/src/rev/93c00ed13933
branches:  trunk
changeset: 377527:93c00ed13933
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jul 15 21:40:03 2023 +0000

description:
tests/lint: test GCC attributes in member declarations

diffstat:

 tests/usr.bin/xlint/lint1/gcc_attribute_var.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 21e2396765cf -r 93c00ed13933 tests/usr.bin/xlint/lint1/gcc_attribute_var.c
--- a/tests/usr.bin/xlint/lint1/gcc_attribute_var.c     Sat Jul 15 21:24:46 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/gcc_attribute_var.c     Sat Jul 15 21:40:03 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gcc_attribute_var.c,v 1.9 2023/07/07 06:03:31 rillig Exp $     */
+/*     $NetBSD: gcc_attribute_var.c,v 1.10 2023/07/15 21:40:03 rillig Exp $    */
 # 3 "gcc_attribute_var.c"
 
 /*
@@ -72,3 +72,16 @@ attribute_after_array_brackets(
 )
 {
 }
+
+struct attribute_in_member_declaration {
+       int __attribute__(())
+           x __attribute__(()),
+           y __attribute__(());
+
+       unsigned int __attribute__(())
+/* FIXME */
+/* expect+1: error: syntax error ',' [249] */
+           bit1:1 __attribute__(()),
+           bit2:2 __attribute__(()),
+           bit3:3 __attribute__(());
+};



Home | Main Index | Thread Index | Old Index