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: don't treat restrict and _Thread_l...
details: https://anonhg.NetBSD.org/src/rev/8f5a000d893b
branches: trunk
changeset: 979982:8f5a000d893b
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jan 18 17:47:44 2021 +0000
description:
lint: don't treat restrict and _Thread_local as volatile anymore
diffstat:
usr.bin/xlint/lint1/cgram.y | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r acea51e401f5 -r 8f5a000d893b usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Mon Jan 18 17:43:43 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Mon Jan 18 17:47:44 2021 +0000
@@ -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 @@
$$ = xcalloc(1, sizeof (pqinf_t));
if ($1 == CONST) {
$$->p_const = true;
+ } else if ($1 == VOLATILE) {
+ $$->p_volatile = true;
} else {
- $$->p_volatile = true;
+ lint_assert($1 == RESTRICT || $1 == THREAD);
}
}
;
Home |
Main Index |
Thread Index |
Old Index