This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[PATCH] No 'unsigned vs. 0' warnings in system headers
- To: gcc-bugs at gcc dot gnu dot org
- Subject: [PATCH] No 'unsigned vs. 0' warnings in system headers
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Wed, 28 Jun 2000 16:47:18 -0700
This fixes bootstrapping with libstdc++-v3.
2000-06-28 Chip Salzenberg <chip@valinux.com>
* c-common.c (shorten_compare): Quiet warnings about unsigned
comparisons with zero when they occur in a system header.
Index: c-common.c
diff -u -2 -p -c -r1.121 c-common.c
cvs server: conflicting specifications of output style
*** c-common.c 2000/06/25 17:27:27 1.121
--- c-common.c 2000/06/28 23:37:52
*************** shorten_compare (op0_ptr, op1_ptr, resty
*** 2811,2815 ****
>= 0, the signedness of the comparison isn't an issue,
so suppress the warning. */
! if (extra_warnings
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
--- 2811,2815 ----
>= 0, the signedness of the comparison isn't an issue,
so suppress the warning. */
! if (extra_warnings && !in_system_header
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
*************** shorten_compare (op0_ptr, op1_ptr, resty
*** 2820,2824 ****
case LT_EXPR:
! if (extra_warnings
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
--- 2820,2824 ----
case LT_EXPR:
! if (extra_warnings && !in_system_header
&& ! (TREE_CODE (primop0) == INTEGER_CST
&& ! TREE_OVERFLOW (convert (signed_type (type),
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K