diff options
author | tegge <tegge@FreeBSD.org> | 1997-06-12 18:10:08 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1997-06-12 18:10:08 +0000 |
commit | 49a4edd9b125cd144ccf256f2f161c0afedc56f1 (patch) | |
tree | e0f763de836425de81de52b183c37445204b6abc /usr.bin | |
parent | f8fabab00256f975a49438e7d272c08b92a4394e (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.bin/xlint/lint1/cgram.y | 11 |
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); |