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 Add a _Noreturn token



details:   https://anonhg.NetBSD.org/src/rev/591f8855ab65
branches:  trunk
changeset: 829059:591f8855ab65
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 15 21:58:54 2018 +0000

description:
Add a _Noreturn token

diffstat:

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

diffs (72 lines):

diff -r 8997fff93d55 -r 591f8855ab65 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Mon Jan 15 21:25:25 2018 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Mon Jan 15 21:58:54 2018 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.94 2017/03/06 21:01:39 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.95 2018/01/15 21:58:54 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.94 2017/03/06 21:01:39 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.95 2018/01/15 21:58:54 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -117,7 +117,7 @@
 }
 %}
 
-%expect 107
+%expect 138
 
 %union {
        int     y_int;
@@ -165,6 +165,7 @@
 %token                 T_REAL
 %token                 T_IMAG
 %token                 T_GENERIC
+%token                 T_NORETURN
 
 /* storage classes (extern, static, auto, register and typedef) */
 %token <y_scl>         T_SCLASS
@@ -576,6 +577,8 @@
        | T_PACKED {
                addpacked();
        }
+       | T_NORETURN {
+       }
        ;
 
 type_attribute_list:
diff -r 8997fff93d55 -r 591f8855ab65 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Mon Jan 15 21:25:25 2018 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Mon Jan 15 21:58:54 2018 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.79 2017/03/06 21:01:39 christos Exp $ */
+/* $NetBSD: scan.l,v 1.80 2018/01/15 21:58:54 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.79 2017/03/06 21:01:39 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.80 2018/01/15 21:58:54 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -208,6 +208,7 @@
        { "_Bool",      T_TYPE,         0,      BOOL,   0,        0,1,0,0,1 },
        { "_Complex",   T_TYPE,         0,      COMPLEX,0,        0,1,0,0,1 },
        { "_Generic",   T_GENERIC,      0,      0,      0,        0,1,0,0,1 },
+       { "_Noreturn",  T_NORETURN,     0,      0,      0,        0,1,0,0,1 },
        { "alias",      T_AT_ALIAS,     0,      0,      0,        0,0,1,1,5 },
        { "aligned",    T_AT_ALIGNED,   0,      0,      0,        0,0,1,1,5 },
        { "alignof",    T_ALIGNOF,      0,      0,      0,        0,0,0,0,4 },



Home | Main Index | Thread Index | Old Index