This is the mail archive of the gcc-patches@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] |
Other format: | [Raw text] |
IMPORTANT: the patch doesn't perform the renames mentioned in the Changelog, this way 1) it is easier to see the changes and 2) it is better to do this operation using "svn move". Please, after applying the patch and before commiting, remember to perform the renames described in the Changelog.
This is the first of the patches resulting from the Wcoercion Project http://gcc.gnu.org/wiki/Wcoercion#Background
a) Wconversion[*]: warn if a negative integer constant expression is implicitly converted to an unsigned type. For example, warn about the assignment unsigned x = -1 if x is unsigned. But do not warn about explicit casts like (unsigned) -1.
b) Wtraditional-conversion: Warn of prototypes causing type conversions different from what would happen in the absence of prototype.
Bootstrapped and tested with --enable-languages=all for trunk revision 1118055 on i686-pc-linux-gnu
[*] The original proposal was to name this option as Wcoercion to avoid confusion with the old functionality of Wconversion. That is why the project is named Wcoercion.
PR c/9072 * c.opt: New option Wtraditional-conversion. Update description of Wconversion. * c-typeck.c: Warnings for prototypes causing type conversions different from what would happen in the absence of prototype are now handled by Wtraditional-conversion. * doc/invoke.texi: Document the changes. * testsuite/gcc.dg/builtin-protos-1.c: Update testsuite. * testsuite/gcc.dg/overflow-warn-2.c: Likewise. * testsuite/gcc.dg/Wconversion.c: Renamed as Wtraditional-conversion.c * testsuite/gcc.dg/dfp/Wconversion-2.c: Renamed as Wtraditional-conversion-2.c * testsuite/gcc.dg/Wconversion-negative-constants.c: New test.
Attachment:
wcoercion-1of3-split.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |