From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27094 invoked by alias); 23 Mar 2011 18:37:19 -0000 Received: (qmail 26947 invoked by uid 22791); 23 Mar 2011 18:37:18 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 18:37:13 +0000 Received: by wyb40 with SMTP id 40so8237157wyb.20 for ; Wed, 23 Mar 2011 11:37:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.58.72 with SMTP id f8mr6925100wbh.181.1300905432111; Wed, 23 Mar 2011 11:37:12 -0700 (PDT) Received: by 10.227.129.76 with HTTP; Wed, 23 Mar 2011 11:37:12 -0700 (PDT) In-Reply-To: <31222297.post@talk.nabble.com> References: <31222297.post@talk.nabble.com> Date: Wed, 23 Mar 2011 18:45:00 -0000 Message-ID: Subject: Re: -Wconversion is very poor From: Jonathan Wakely To: Lisp2D Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00364.txt.bz2 On 23 March 2011 17:58, Lisp2D wrote: > > I've turned on all warnings to have clean program. > Turn on -Wconversion but it will not care about BIG trouble in C++: > conversion. > > class A{ > public: > A(unsigned =A0 =A0 =A0int){} > }; > > class B{ > public: > B(A){} > }; > > B b(-1); //OK without warnings > int =A0 =A0 main(void){} > > ---- > -1 =3D> A(FF..FF) =3D> B(FF..FF) > I want to see all program like: > > B b(A(-1)); > > Which warning I must to set? Your question is inappropriate for this mailing list, questions about using or building gcc should go to gcc-help@gcc.gnu.org Please take any follow up question to that list, thanks. As clearly documented in the manual, you need -Wsign-conversion in C++ http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Warning-Options.html#index-Wcon= version-368