From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18758 invoked by alias); 17 Oct 2007 07:02:15 -0000 Received: (qmail 18737 invoked by uid 22791); 17 Oct 2007 07:02:12 -0000 X-Spam-Check-By: sourceware.org Received: from cluster-e.mailcontrol.com (HELO cluster-e.mailcontrol.com) (217.79.216.190) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Oct 2007 07:02:08 +0000 Received: from c2-ex002.groupinfra.com ([212.123.206.142]) by rly18e.srv.mailcontrol.com (MailControl) with ESMTP id l9H6qq7Y031188 for ; Wed, 17 Oct 2007 08:01:40 +0100 Received: from cz-ex001.groupinfra.com ([158.234.170.116]) by c2-ex002.groupinfra.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Oct 2007 09:01:20 +0200 Received: from cz-ex002.groupinfra.com ([158.234.170.118]) by cz-ex001.groupinfra.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Oct 2007 09:01:19 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Subject: gcc warnings Date: Wed, 17 Oct 2007 09:08:00 -0000 Message-ID: <53248A54C3B3EC4EAAD993D10A6DD01203C5DAB7@cz-ex002.groupinfra.com> From: "Humpolicek, Jiri - Acision" To: Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg00205.txt.bz2 Hi, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 I have, from my point of view, strange pr= oblem. I want to tell gcc to report all compilation warnings, especially wa= rnings about assigment from variable of greater type to variable with small= er type. For example, when I write following code and compile it with next = command no warning is reported: c++ -o test test.cpp -Wall -Wextra -Wconversion -pedantic #include "stdio.h" int main() { =A0=A0=A0=A0=A0=A0=A0 long a =3D 10000; =A0=A0=A0=A0=A0=A0=A0 unsigned char b =3D a; =A0=A0=A0=A0=A0=A0=A0 printf("%d\n", b); =A0=A0=A0=A0=A0=A0=A0 return b; } Gcc -v prints these information, but I have already test it on different ve= rsions but with same unsatsfactory results: Using built-in specs. Target: i686-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/config= ure --prefix=3D/usr --bindir=3D/usr/i686-pc-linux-gnu/gcc-bin/4.1.2 --inclu= dedir=3D/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include --datadir=3D/usr/share= /gcc-data/i686-pc-linux-gnu/4.1.2 --mandir=3D/usr/share/gcc-data/i686-pc-li= nux-gnu/4.1.2/man --infodir=3D/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/i= nfo --with-gxx-include-dir=3D/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g= ++-v4 --host=3Di686-pc-linux-gnu --build=3Di686-pc-linux-gnu --disable-alti= vec --enable-nls --without-included-gettext --with-system-zlib --disable-ch= ecking --disable-werror --enable-secureplt --disable-libunwind-exceptions -= -disable-multilib --enable-libmudflap --disable-libssp --enable-java-awt=3D= gtk --enable-objc-gc --enable-languages=3Dc,c++,java,objc,obj-c++,fortran -= -enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-cloc= ale=3Dgnu Thread model: posix gcc version 4.1.2 (Gentoo 4.1.2) Where is the problem? Thanks for explanations and have a nice day, Jiri Humpolicek This e-mail and any attachment is for authorised use by the intended recipi= ent(s) only. This email contains confidential information. It should not be= copied, disclosed to, retained or used by, any party other than the intend= ed recipient. Any unauthorised distribution, dissemination or copying of th= is E-mail or its attachments, and/or any use of any information contained i= n them, is strictly prohibited and may be illegal. If you are not an intend= ed recipient then please promptly delete this e-mail and any attachment and= all copies and inform the sender directly via email. Any emails that you s= end to us may be monitored by systems or persons other than the named commu= nicant for the purposes of ascertaining whether the communication complies = with the law and company policies.