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 handle cast in the rhs of a - op.



details:   https://anonhg.NetBSD.org/src/rev/1ddd033227df
branches:  trunk
changeset: 538508:1ddd033227df
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 22 00:06:46 2002 +0000

description:
handle cast in the rhs of a - op.

diffstat:

 usr.bin/xlint/lint1/tree.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 3feef60d4bbb -r 1ddd033227df usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Tue Oct 22 00:01:55 2002 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Tue Oct 22 00:06:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.27 2002/10/21 22:48:13 christos Exp $       */
+/*     $NetBSD: tree.c,v 1.28 2002/10/22 00:06:46 christos Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.27 2002/10/21 22:48:13 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.28 2002/10/22 00:06:46 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -3763,7 +3763,9 @@
 
        switch (tn->tn_op) {
        case MINUS:
-               if (tn->tn_right->tn_op != CON)
+               if (tn->tn_right->tn_op == CVT)
+                       return conaddr(tn->tn_right, symp, offsp);
+               else if (tn->tn_right->tn_op != CON)
                        return (-1);
                /* FALLTHROUGH */
        case PLUS:



Home | Main Index | Thread Index | Old Index