diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2005-11-29 19:50:34 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2005-11-29 19:50:34 +0000 |
commit | 2f807aecb889a934c0d979638c087fe5343e86c9 (patch) | |
tree | c3f8a48d3a016fbf86ffc83d5f0f7dcf11305995 | |
parent | 2820aee78fe5646afc680626f831bd3d91ad2b37 (diff) |
Remove XXX_BROKEN_GCC ifdefs, which were used to work around an ancient
(from 1995) gcc bug on i386. From NetBSD.
-rw-r--r-- | usr.bin/xlint/lint1/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/cgram.y | 15 | ||||
-rw-r--r-- | usr.bin/xlint/lint1/tree.c | 38 |
3 files changed, 5 insertions, 52 deletions
diff --git a/usr.bin/xlint/lint1/Makefile b/usr.bin/xlint/lint1/Makefile index b076d2fac4f..6c71bfc3f70 100644 --- a/usr.bin/xlint/lint1/Makefile +++ b/usr.bin/xlint/lint1/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2004/01/05 02:55:28 espie Exp $ +# $OpenBSD: Makefile,v 1.5 2005/11/29 19:50:33 cloder Exp $ # $NetBSD: Makefile,v 1.3 1995/07/04 01:53:05 cgd Exp $ PROG= lint1 @@ -14,8 +14,6 @@ CLEANFILES+=y.tab.h cgram.c scan.c BINDIR= /usr/libexec - XXX: -O causes the gcc to die on the i386, when compiling tree.o -CFLAGS+= -DXXX_BROKEN_GCC .if (${MACHINE_ARCH} == "sparc64") CFLAGS+= -O0 .endif diff --git a/usr.bin/xlint/lint1/cgram.y b/usr.bin/xlint/lint1/cgram.y index f86aeeccb4a..49323645bb4 100644 --- a/usr.bin/xlint/lint1/cgram.y +++ b/usr.bin/xlint/lint1/cgram.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: cgram.y,v 1.10 2005/11/23 22:57:36 cloder Exp $ */ +/* $OpenBSD: cgram.y,v 1.11 2005/11/29 19:50:33 cloder Exp $ */ /* $NetBSD: cgram.y,v 1.8 1995/10/02 17:31:35 jpo Exp $ */ /* @@ -34,7 +34,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: cgram.y,v 1.10 2005/11/23 22:57:36 cloder Exp $"; +static char rcsid[] = "$OpenBSD: cgram.y,v 1.11 2005/11/29 19:50:33 cloder Exp $"; #endif #include <stdlib.h> @@ -1654,21 +1654,10 @@ toicon(tn) 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); diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c index ce1490b6be3..a1f4893d1d5 100644 --- a/usr.bin/xlint/lint1/tree.c +++ b/usr.bin/xlint/lint1/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.17 2005/11/29 03:42:32 cloder Exp $ */ +/* $OpenBSD: tree.c,v 1.18 2005/11/29 19:50:33 cloder Exp $ */ /* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: tree.c,v 1.17 2005/11/29 03:42:32 cloder Exp $"; +static char rcsid[] = "$OpenBSD: tree.c,v 1.18 2005/11/29 19:50:33 cloder Exp $"; #endif #include <stdlib.h> @@ -2635,20 +2635,6 @@ plength(type_t *tp) return (getinode(st, (quad_t)(elem * elsz / CHAR_BIT))); } -#ifdef XXX_BROKEN_GCC -static int -quad_t_eq(quad_t x, quad_t y) -{ - return (x == y); -} - -static int -u_quad_t_eq(u_quad_t x, u_quad_t y) -{ - return (x == y); -} -#endif - /* * Do only as much as necessary to compute constant expressions. * Called only if the operator allows folding and (both) operands @@ -2749,11 +2735,7 @@ fold(tnode_t *tn) q = utyp ? ul > ur : sl > sr; break; case EQ: -#ifdef XXX_BROKEN_GCC - q = utyp ? u_quad_t_eq(ul, ur) : quad_t_eq(sl, sr); -#else q = utyp ? ul == ur : sl == sr; -#endif break; case NE: q = utyp ? ul != ur : sl != sr; @@ -2787,14 +2769,6 @@ fold(tnode_t *tn) return (cn); } -#ifdef XXX_BROKEN_GCC -int -ldbl_t_neq(ldbl_t x, ldbl_t y) -{ - return (x != y); -} -#endif - /* * Same for operators whose operands are compared with 0 (test context). */ @@ -2810,22 +2784,14 @@ foldtst(tnode_t *tn) lerror("foldtst() 1"); if (isftyp(tn->tn_left->tn_type->t_tspec)) { -#ifdef XXX_BROKEN_GCC - l = ldbl_t_neq(tn->tn_left->tn_val->v_ldbl, 0.0); -#else l = tn->tn_left->tn_val->v_ldbl != 0.0; -#endif } else { l = tn->tn_left->tn_val->v_quad != 0; } if (modtab[tn->tn_op].m_binary) { if (isftyp(tn->tn_right->tn_type->t_tspec)) { -#ifdef XXX_BROKEN_GCC - r = ldbl_t_neq(tn->tn_right->tn_val->v_ldbl, 0.0); -#else r = tn->tn_right->tn_val->v_ldbl != 0.0; -#endif } else { r = tn->tn_right->tn_val->v_quad != 0; } |