diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-03-05 08:48:16 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-03-05 08:48:16 +0000 |
commit | ca2a5226b4ee178667f1a8f756232cc79e8eac72 (patch) | |
tree | 7a67c32bb03293039a1f0c6a107ddcd37d1a0f30 /usr.bin | |
parent | e1fc39bef05791b780cdcae750a8a3b435517a67 (diff) |
Work around a GCC code generation bug if XXX_BROKEN_GCC; fixed NetBSD
PR 2097
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xlint/lint1/cgram.y | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/xlint/lint1/cgram.y b/usr.bin/xlint/lint1/cgram.y index e65584ac998..502994decc0 100644 --- a/usr.bin/xlint/lint1/cgram.y +++ b/usr.bin/xlint/lint1/cgram.y @@ -1607,15 +1607,26 @@ toicon(tn) } else { i = (int)v->v_quad; if (isutyp(t)) { - if ((u_quad_t)v->v_quad > INT_MAX) { + if ((u_quad_t)v->v_quad > UINT_MAX) { /* integral constant too large */ warning(56); } } else { +#ifdef XXX_BROKEN_GCC + if (v->v_quad > INT_MAX) { + /* integral constant too large */ + warning(56); + } + 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); |