Re: Compiler warnings in ccache 3.2.3
Tom Lane <[email protected]> Mon, 17 Aug 2015 17:25:53 -0400
| Newsgroups | gmane.comp.compilers.ccache |
|---|---|
| Message-ID | <[email protected]> |
Joel Rosdahl <[email protected]> writes: >> I got a few warnings about assignments of pointers to "bool" values. I >> think these are legitimate gripes, because on platforms where bool is only >> a byte wide, the net effect will be to assign the pointer's low-order byte >> to the bool. > Well, as I interpret the C99 standard, bool from stdbool.h (AKA _Bool) is > guaranteed to only contain 1 or 0: ... > However, ccache's system.h has fallback code on systems that don't have > stdbool.h and then a bool can be typedef-ed to be a signed char, which is > something I didn't think of when writing the code in question. (I guess you > are on such an "antique" non-C99 system?) Ah, right, that explains why I only saw the warnings on a pretty old box. regards, tom lane