PR 35635 -Wconversion problematic with bitfields
Joseph S. Myers
joseph@codesourcery.com
Tue Aug 12 14:28:00 GMT 2008
On Tue, 5 Aug 2008, Manuel López-Ibáñez wrote:
> 2008-08-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
>
> PR 35635
> * c-common.c (conversion_warning): Use a switch. Ignore boolean
> expressions except for conversions to signed:1 bitfields. Handle
> COND_EXPR with constant operands.
>
> testsuite/
> * gcc.dg/pr35635.c: New.
> * gcc.dg/Wconversion-integer.c: Update.
> * gcc.dg/Wconversion-integer-no-sign.c: Update.
> * gcc.dg/Wsign-conversion.c: Update.
The C testcases and the substantive parts of the c-common.c patch are OK.
However, there are a number of places in the c-common.c patch where you
change an empty line to have only whitespace on it, or create a line with
trailing whitespace where there wasn't trailing whitespace before. Please
make sure there are no such spurious changes in the patch you check in;
any new or modified lines should not have any trailing whitespace
(including the case of a line with no text on it). In addition, there are
cases where you fix the indentation of lines not otherwise being touched
by the patch - these look like correct fixes, replacing spaces by tabs,
but it would be best for such indentation fixes to be checked in
separately rather than mixed up with the substantive changes in the patch.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list