This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: No 'unsigned vs. 0' warnings in system headers


According to Jeffrey A Law:
>   In message <20000628164718.D1325@perlsupport.com>you write:
>   > 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.
> Err, doesn't this actually indicate a problem with libstdc++-v3 that
> needs to be fixed?

Not necessarily.  The macros in <cwctype.h> can't assume that their
parameters are either signed or unsigned, so they have to compare
against zero.  The C++ functions that use those macros take wint_t
parameters, and wint_t is unsigned, but that's a valid choice.
-- 
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]