Module Name: src Committed By: christos Date: Sun Dec 26 18:16:41 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: cgram.y lex.c Log Message: Add clang's optnone attribute. To generate a diff of this commit: cvs rdiff -u -r1.377 -r1.378 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.96 -r1.97 src/usr.bin/xlint/lint1/lex.c 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.377 src/usr.bin/xlint/lint1/cgram.y:1.378 --- src/usr.bin/xlint/lint1/cgram.y:1.377 Mon Dec 20 14:34:01 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sun Dec 26 13:16:41 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.377 2021/12/20 19:34:01 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.378 2021/12/26 18:16:41 christos 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.377 2021/12/20 19:34:01 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.378 2021/12/26 18:16:41 christos Exp $"); #endif #include <limits.h> @@ -251,6 +251,7 @@ anonymize(sym_t *s) %token T_AT_NOTHROW %token T_AT_NO_INSTRUMENT_FUNCTION %token T_AT_OPTIMIZE +%token T_AT_OPTNONE %token T_AT_PACKED %token T_AT_PCS %token T_AT_PURE @@ -2107,6 +2108,7 @@ gcc_attribute_spec: | T_AT_NOTHROW | T_AT_NO_INSTRUMENT_FUNCTION | T_AT_OPTIMIZE T_LPAREN string T_RPAREN + | T_AT_OPTNONE | T_AT_PACKED { addpacked(); } Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.96 src/usr.bin/xlint/lint1/lex.c:1.97 --- src/usr.bin/xlint/lint1/lex.c:1.96 Sat Dec 25 08:51:42 2021 +++ src/usr.bin/xlint/lint1/lex.c Sun Dec 26 13:16:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.96 2021/12/25 13:51:42 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.97 2021/12/26 18:16:41 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: lex.c,v 1.96 2021/12/25 13:51:42 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.97 2021/12/26 18:16:41 christos Exp $"); #endif #include <ctype.h> @@ -197,6 +197,7 @@ static struct keyword { kwdef_gcc_attr( "noreturn", T_AT_NORETURN), kwdef_gcc_attr( "nothrow", T_AT_NOTHROW), kwdef_gcc_attr( "optimize", T_AT_OPTIMIZE), + kwdef_gcc_attr( "optnone", T_AT_OPTNONE), kwdef_gcc_attr( "packed", T_AT_PACKED), kwdef_token( "__packed", T_PACKED, 0,0,0,0,1), kwdef_gcc_attr( "pcs", T_AT_PCS),