[PATCH] [5of5] looking for feedback on Wcoercion warning (for stage1)

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Aug 11 17:30:00 GMT 2006


(The following patch implements part of the functionality of the
Wcoercion project as explained in
http://gcc.gnu.org/wiki/Wcoercion#Background ).

The function unsigned_conversion_warning() in gcc/c-common.c
encapsulates two different and very particular warnings:
1) Warn for negative integer values assigned to unsigned type if
-Wcoercion option is used.
2) Warn for  a large constant truncated to unsigned type.

In order to tidy up convert_and_check() and keep toghether the
warnings produced by Wcoercion, I propose the removal of
unsigned_conversion_warning(). Warning 1) is moved into
coercion_warning() while warning 2) is moved directly into
convert_and_check().

This is the last patch of a series of 5 patches. The previous patch
can be found at
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00289.html .

Bootstrapped and tested with --enable-languages=all for trunk revision
115951 on i686-pc-linux-gnu

:ADDPATCH c/c++:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wcoercion-5-kill-unsigned_conversion_warning-115951.patch
Type: text/x-patch
Size: 3118 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060811/332615b5/attachment.bin>


More information about the Gcc-patches mailing list