summaryrefslogtreecommitdiffstats
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1997-06-12 18:10:08 +0000
committertegge <tegge@FreeBSD.org>1997-06-12 18:10:08 +0000
commit49a4edd9b125cd144ccf256f2f161c0afedc56f1 (patch)
treee0f763de836425de81de52b183c37445204b6abc /usr.bin/xlint
parentf8fabab00256f975a49438e7d272c08b92a4394e (diff)
downloadFreeBSD-src-49a4edd9b125cd144ccf256f2f161c0afedc56f1.zip
FreeBSD-src-49a4edd9b125cd144ccf256f2f161c0afedc56f1.tar.gz
Work around a gcc bug (causing false warnings about integral constant being too large, even when the integral constant was e.g. 1).
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/cgram.y11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/xlint/lint1/cgram.y b/usr.bin/xlint/lint1/cgram.y
index e65584a..6be2089 100644
--- a/usr.bin/xlint/lint1/cgram.y
+++ b/usr.bin/xlint/lint1/cgram.y
@@ -1612,10 +1612,21 @@ toicon(tn)
warning(56);
}
} else {
+#ifdef XXX_BROKEN_GCC
+ if (v->v_quad > INT_MAX) {
+ /* integral constant too large */
+ warning(56);
+ }
+ else if (v->v_quad < INT_MIN) {
+ /* integral constant too large */
+ warning(56);
+ }
+#else
if (v->v_quad > INT_MAX || v->v_quad < INT_MIN) {
/* integral constant too large */
warning(56);
}
+#endif
}
}
free(v);
OpenPOWER on IntegriCloud