From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4577 invoked by alias); 19 Aug 2008 22:05:22 -0000 Received: (qmail 4568 invoked by uid 22791); 19 Aug 2008 22:05:22 -0000 X-Spam-Check-By: sourceware.org Received: from perm68-235.ij.net (HELO smirk.3gfp.com) (209.216.68.235) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Aug 2008 22:04:38 +0000 Received: from localhost (localhost [127.0.0.1]) by smirk.3gfp.com (Postfix) with ESMTP id B96119AC25C for ; Tue, 19 Aug 2008 18:04:35 -0400 (EDT) Received: from smirk.3gfp.com ([127.0.0.1]) by localhost (smirk.3gfp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0or-Nd86bUrW for ; Tue, 19 Aug 2008 18:04:33 -0400 (EDT) Received: from harveybook.swlocal (64-132-158-194.static.twtelecom.net [64.132.158.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smirk.3gfp.com (Postfix) with ESMTP id 3DA199B20F2 for ; Tue, 19 Aug 2008 18:04:33 -0400 (EDT) Message-ID: <48AB4370.9020104@3gfp.com> Date: Tue, 19 Aug 2008 22:07:00 -0000 From: Richard Harvey Chapman User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: gcc Subject: Re: regarding type promotion References: <48AA5377.9080001@redpinesignals.com> <1219162574.6008.7.camel@bob-desktop> <48AAF5B6.3030704@3gfp.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2008-08/txt/msg00183.txt.bz2 Ian Lance Taylor wrote: > That's why gcc warns about it, with -Wparentheses, which is part of > -Wall. Interesting. I've never noticed that. I guess it is because g++ doesn't warn about it. Is this a bug in g++? Thanks, H. hchapman@anthrax:~$ gcc --version gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. hchapman@anthrax:~$ gcc -Wall -o a a.c a.c: In function "main": a.c:9: warning: suggest parentheses around comparison in operand of & hchapman@anthrax:~$ g++ -Wall -o a a.c hchapman@anthrax:~$