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 leave pragmas alone.



details:   https://anonhg.NetBSD.org/src/rev/2f7dc8d36460
branches:  trunk
changeset: 820915:2f7dc8d36460
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 15 21:10:24 2017 +0000

description:
leave pragmas alone.

diffstat:

 usr.bin/xlint/lint1/scan.l |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r baf4ded684f0 -r 2f7dc8d36460 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Sun Jan 15 20:36:21 2017 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Sun Jan 15 21:10:24 2017 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.77 2017/01/07 18:28:49 christos Exp $ */
+/* $NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 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.77 2017/01/07 18:28:49 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -1090,6 +1090,9 @@
                continue;
 
        if (!isdigit((unsigned char)c)) {
+               if (strncmp(cp, "pragma", 6) == 0
+                   && isspace((unsigned char)cp[6]))
+                       return;
        error:
                /* undefined or invalid # directive */
                warning(255);



Home | Main Index | Thread Index | Old Index