Module Name:    src
Committed By:   rillig
Date:           Mon Jan 18 17:47:44 UTC 2021

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

Log Message:
lint: don't treat restrict and _Thread_local as volatile anymore


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/usr.bin/xlint/lint1/cgram.y

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.150 src/usr.bin/xlint/lint1/cgram.y:1.151
--- src/usr.bin/xlint/lint1/cgram.y:1.150	Mon Jan 18 17:20:15 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Mon Jan 18 17:47:44 2021
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.150 2021/01/18 17:20:15 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.151 2021/01/18 17:47:44 rillig 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.150 2021/01/18 17:20:15 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.151 2021/01/18 17:47:44 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -1195,8 +1195,10 @@ type_qualifier:
 		$$ = xcalloc(1, sizeof (pqinf_t));
 		if ($1 == CONST) {
 			$$->p_const = true;
-		} else {
+		} else if ($1 == VOLATILE) {
 			$$->p_volatile = true;
+		} else {
+			lint_assert($1 == RESTRICT || $1 == THREAD);
 		}
 	  }
 	;

Reply via email to