summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2023-06-30 08:03:01 +0000
committerrillig <rillig@NetBSD.org>2023-06-30 08:03:01 +0000
commitee47fe31e7ca4755fed8e26228522a93f3e59333 (patch)
treebd0400927ee9c4cb3ada94087f7c7e81928dc0e6 /usr.bin
parent032755a0f56d3941855c576404e393dc280ce6bb (diff)
tests/lint: extend test for sizeof and offsetof
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/xlint/lint1/cgram.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/xlint/lint1/cgram.y b/usr.bin/xlint/lint1/cgram.y
index ef771f1246a..22fb7254964 100644
--- a/usr.bin/xlint/lint1/cgram.y
+++ b/usr.bin/xlint/lint1/cgram.y
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.439 2023/06/29 22:52:44 rillig Exp $ */
+/* $NetBSD: cgram.y,v 1.440 2023/06/30 08:03:01 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: cgram.y,v 1.439 2023/06/29 22:52:44 rillig Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.440 2023/06/30 08:03:01 rillig Exp $");
#endif
#include <limits.h>
@@ -405,6 +405,7 @@ primary_expression:
}
| generic_selection
/* GCC primary-expression, see c_parser_postfix_expression */
+ /* TODO: C99 7.17p3 allows not only an identifier but a designator. */
| T_BUILTIN_OFFSETOF T_LPAREN type_name T_COMMA identifier T_RPAREN {
symtyp = FMEMBER;
$$ = build_offsetof($3, getsym($5));