Module Name:    src
Committed By:   christos
Date:           Mon Mar  4 15:26:18 UTC 2019

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

Log Message:
add gnu_printf


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/xlint/lint1/scan.l

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.101 src/usr.bin/xlint/lint1/cgram.y:1.102
--- src/usr.bin/xlint/lint1/cgram.y:1.101	Sun Mar  3 18:06:08 2019
+++ src/usr.bin/xlint/lint1/cgram.y	Mon Mar  4 10:26:18 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.101 2019/03/03 23:06:08 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.102 2019/03/04 15:26:18 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.101 2019/03/03 23:06:08 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.102 2019/03/04 15:26:18 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -212,6 +212,7 @@ anonymize(sym_t *s)
 %token <y_type>		T_AT_DESTRUCTOR
 %token <y_type>		T_AT_FORMAT
 %token <y_type>		T_AT_FORMAT_ARG
+%token <y_type>		T_AT_FORMAT_GNU_PRINTF
 %token <y_type>		T_AT_FORMAT_PRINTF
 %token <y_type>		T_AT_FORMAT_SCANF
 %token <y_type>		T_AT_FORMAT_STRFMON
@@ -515,7 +516,8 @@ declaration:
 	;
 
 type_attribute_format_type:
-	  T_AT_FORMAT_PRINTF
+	  T_AT_FORMAT_GNU_PRINTF
+	| T_AT_FORMAT_PRINTF
 	| T_AT_FORMAT_SCANF
 	| T_AT_FORMAT_STRFMON
 	| T_AT_FORMAT_STRFTIME

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.87 src/usr.bin/xlint/lint1/scan.l:1.88
--- src/usr.bin/xlint/lint1/scan.l:1.87	Sun Mar  3 18:06:08 2019
+++ src/usr.bin/xlint/lint1/scan.l	Mon Mar  4 10:26:18 2019
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.87 2019/03/03 23:06:08 christos Exp $ */
+/* $NetBSD: scan.l,v 1.88 2019/03/04 15:26:18 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: scan.l,v 1.87 2019/03/03 23:06:08 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.88 2019/03/04 15:26:18 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -245,6 +245,7 @@ static	struct	kwtab {
 	{ "format",	T_AT_FORMAT,	0,	0,	0,	  0,0,1,1,5 },
 	{ "format_arg", T_AT_FORMAT_ARG,0,	0,	0,	  0,0,1,1,5 },
 	{ "gnu_inline",	T_AT_GNU_INLINE,0,	0,	0,	  0,0,1,1,5 },
+	{ "gnu_printf",	T_AT_FORMAT_GNU_PRINTF,0,0,	0,	  0,0,1,1,5 },
 	{ "goto",	T_GOTO,		0,	0,	0,	  0,0,0,0,1 },
 	{ "if",		T_IF,		0,	0,	0,	  0,0,0,0,1 },
 	{ "imag",	T_IMAG,		0,	0,	0,	  0,1,0,0,4 },

Reply via email to