Module Name:    src
Committed By:   rillig
Date:           Mon Jan 18 18:14:57 UTC 2021

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

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 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.153 src/usr.bin/xlint/lint1/cgram.y:1.154
--- src/usr.bin/xlint/lint1/cgram.y:1.153	Mon Jan 18 17:59:51 2021
+++ src/usr.bin/xlint/lint1/cgram.y	Mon Jan 18 18:14:57 2021
@@ -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 @@ anonymize(sym_t *s)
 %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

Reply via email to