This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Florian Weimer wrote:
I think it's still valuable to use static_cast<bool> (expr) for C++ because we don't need any extensions (except __FUNCTION__ for early C++) because the parentheses do not count in this context; assert (a = 1) still results in a warning.
OK, but in that case the C version shouldn't use 'sizeof ((expr) ? 1 : 0)' either, right? As that would suppress the warning in the C case. So it sounds like your original patch was right after all (and sorry about the noise...).
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |