Module Name:    src
Committed By:   christos
Date:           Fri Sep 17 21:06:04 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y lex.c

Log Message:
Extra commit to fix the actual wrong comment before:
Add _Static_assert grammar and keyword


To generate a diff of this commit:
cvs rdiff -u -r1.365 -r1.366 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.82 -r1.83 src/usr.bin/xlint/lint1/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.365 src/usr.bin/xlint/lint1/cgram.y:1.366
--- src/usr.bin/xlint/lint1/cgram.y:1.365	Fri Sep 17 16:17:30 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Fri Sep 17 17:06:04 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.365 2021/09/17 20:17:30 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.366 2021/09/17 21:06:04 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.365 2021/09/17 20:17:30 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.366 2021/09/17 21:06:04 christos Exp $");
 #endif
 
 #include <limits.h>
@@ -1571,8 +1571,8 @@ designator:			/* C99 6.7.8 "Initializati
 	;
 
 static_assert_declaration:
-	  T_STATIC_ASSERT T_LPAREN constant_expr T_COMMA T_STRING T_RPAREN T_SEMI
-	| T_STATIC_ASSERT T_LPAREN constant_expr T_RPAREN T_SEMI
+	  T_STATIC_ASSERT T_LPAREN constant_expr T_COMMA T_STRING T_RPAREN T_SEMI /* C11 */
+	| T_STATIC_ASSERT T_LPAREN constant_expr T_RPAREN T_SEMI /* C23 */
  	;
 
 range:

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.82 src/usr.bin/xlint/lint1/lex.c:1.83
--- src/usr.bin/xlint/lint1/lex.c:1.82	Fri Sep 17 16:17:30 2021
+++ src/usr.bin/xlint/lint1/lex.c	Fri Sep 17 17:06:04 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.82 2021/09/17 20:17:30 christos Exp $ */
+/* $NetBSD: lex.c,v 1.83 2021/09/17 21:06:04 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.82 2021/09/17 20:17:30 christos Exp $");
+__RCSID("$NetBSD: lex.c,v 1.83 2021/09/17 21:06:04 christos Exp $");
 #endif
 
 #include <ctype.h>
@@ -217,7 +217,7 @@ static	struct	kwtab {
 	kwdef_type(	"signed",	SIGNED,			1,0,0,0,3),
 	kwdef_keyword(	"sizeof",	T_SIZEOF),
 	kwdef_sclass(	"static",	STATIC,			0,0,0,0,1),
-	kwdef_keyword(	"_Static_assert",T_STATIC_ASSERT),
+	kwdef_keyword(	"_Static_assert",	T_STATIC_ASSERT),
 	kwdef_gcc_attr(	"strfmon",	T_AT_FORMAT_STRFMON),
 	kwdef_gcc_attr(	"strftime",	T_AT_FORMAT_STRFTIME),
 	kwdef_gcc_attr(	"string",	T_AT_STRING),

Reply via email to