Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/lint1 lint: fix C11 mode to not allow C23 feat...



details:   https://anonhg.NetBSD.org/src/rev/b04fd8683332
branches:  trunk
changeset: 377245:b04fd8683332
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Jul 03 09:33:07 2023 +0000

description:
lint: fix C11 mode to not allow C23 features (since yesterday)

diffstat:

 tests/usr.bin/xlint/lint1/msg_353.c |  4 +++-
 usr.bin/xlint/lint1/main1.c         |  6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 008cd57dee12 -r b04fd8683332 tests/usr.bin/xlint/lint1/msg_353.c
--- a/tests/usr.bin/xlint/lint1/msg_353.c       Mon Jul 03 07:19:57 2023 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_353.c       Mon Jul 03 09:33:07 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_353.c,v 1.1 2023/07/02 23:45:10 rillig Exp $       */
+/*     $NetBSD: msg_353.c,v 1.2 2023/07/03 09:33:07 rillig Exp $       */
 # 3 "msg_353.c"
 
 // Test for message 353: empty initializer braces require C23 or later [353]
@@ -6,6 +6,8 @@
 // See also:
 //     c23.c
 
+/* lint1-extra-flags: -Ac11 */
+
 void
 c23(void)
 {
diff -r 008cd57dee12 -r b04fd8683332 usr.bin/xlint/lint1/main1.c
--- a/usr.bin/xlint/lint1/main1.c       Mon Jul 03 07:19:57 2023 +0000
+++ b/usr.bin/xlint/lint1/main1.c       Mon Jul 03 09:33:07 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main1.c,v 1.67 2023/07/02 23:40:23 rillig Exp $        */
+/*     $NetBSD: main1.c,v 1.68 2023/07/03 09:33:07 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: main1.c,v 1.67 2023/07/02 23:40:23 rillig Exp $");
+__RCSID("$NetBSD: main1.c,v 1.68 2023/07/03 09:33:07 rillig Exp $");
 #endif
 
 #include <sys/types.h>
@@ -231,7 +231,7 @@ main(int argc, char *argv[])
                                allow_c90 = true;
                                allow_c99 = true;
                                allow_c11 = true;
-                               allow_c23 = true;
+                               allow_c23 = false;
                        } else
                                usage();
                        break;



Home | Main Index | Thread Index | Old Index