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 precedence of __builtin_offsetof
details: https://anonhg.NetBSD.org/src/rev/aa524d55fec6
branches: trunk
changeset: 958761:aa524d55fec6
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Jan 18 18:14:57 2021 +0000
description:
lint: fix precedence of __builtin_offsetof
A previous version of the C grammar contained TBUILTIN_SIZEOF in this
place, which had two typos. Therefore it was handled as a separate
token that was otherwise ignored. Curiously, bison didn't warn about
this obvious inconsistency.
diffstat:
usr.bin/xlint/lint1/cgram.y | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r cdff332812dd -r aa524d55fec6 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y Mon Jan 18 17:59:51 2021 +0000
+++ b/usr.bin/xlint/lint1/cgram.y Mon Jan 18 18:14:57 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.153 2021/01/18 17:59:51 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.154 2021/01/18 18:14:57 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.153 2021/01/18 17:59:51 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.154 2021/01/18 18:14:57 rillig Exp $");
#endif
#include <limits.h>
@@ -261,7 +261,7 @@
%left T_SHIFT
%left T_ADDITIVE
%left T_ASTERISK T_MULTIPLICATIVE
-%right T_UNARY T_INCDEC T_SIZEOF T_ALIGNOF T_REAL T_IMAG
+%right T_UNARY T_INCDEC T_SIZEOF T_BUILTIN_OFFSETOF T_ALIGNOF T_REAL T_IMAG
%left T_LPAREN T_LBRACK T_MEMBACC
%token <y_sb> T_NAME
Home |
Main Index |
Thread Index |
Old Index