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 allow c9x struct casts (in new libXt)
details: https://anonhg.NetBSD.org/src/rev/9a149907255a
branches: trunk
changeset: 452545:9a149907255a
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 12 23:32:45 2019 +0000
description:
allow c9x struct casts (in new libXt)
diffstat:
usr.bin/xlint/lint1/tree.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 347cd77689ea -r 9a149907255a usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Fri Jul 12 22:45:07 2019 +0000
+++ b/usr.bin/xlint/lint1/tree.c Fri Jul 12 23:32:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.86 2018/09/07 15:16:15 christos Exp $ */
+/* $NetBSD: tree.c,v 1.87 2019/07/12 23:32:45 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.86 2018/09/07 15:16:15 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.87 2019/07/12 23:32:45 christos Exp $");
#endif
#include <stdlib.h>
@@ -3199,8 +3199,10 @@
return NULL;
} else if (nt == STRUCT || nt == ARRAY || nt == FUNC) {
/* invalid cast expression */
- error(147);
- return (NULL);
+ if (!Sflag || nt == ARRAY || nt == FUNC) {
+ error(147);
+ return (NULL);
+ }
} else if (ot == STRUCT || ot == UNION) {
/* invalid cast expression */
error(147);
Home |
Main Index |
Thread Index |
Old Index