From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32034 invoked by alias); 16 Sep 2006 01:08:17 -0000 Received: (qmail 31994 invoked by uid 48); 16 Sep 2006 01:08:09 -0000 Date: Sat, 16 Sep 2006 01:08:00 -0000 Message-ID: <20060916010809.31993.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/26167] -Wconversion fails to detect signedness conversion from int to unsigned int in fuction call In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "lopezibanez at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg01504.txt.bz2 List-Id: ------- Comment #6 from lopezibanez at gmail dot com 2006-09-16 01:08 ------- In which way gcc reports the problem correctly? What gcc currently reports is that if the prototype were missing the value would be passed as a signed int. It is not warning you about the conversion, it warns you about the effect of having a prototype. If you mean that gcc (and g++) should warn that a signed variable is passed to a function that expects an unsigned variable, then when using the -Wcoercion flag (provided by the Wcoercion project [*]), both cc1 and cc1plus report: pr26167.cpp:10: warning: coercion to 'unsigned int' from 'int' may alter its value [*] http://gcc.gnu.org/wiki/Wcoercion -- lopezibanez at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lopezibanez at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26167