From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16870 invoked by alias); 12 Jul 2005 16:32:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16843 invoked by uid 22791); 12 Jul 2005 16:32:44 -0000 Received: from h-68-164-203-246.nycmny83.covad.net (HELO dberlin.org) (68.164.203.246) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 12 Jul 2005 16:32:44 +0000 Received: from [127.0.0.1] (HELO localhost) by dberlin.org (CommuniGate Pro SMTP 4.3.4) with ESMTP id 8203634; Tue, 12 Jul 2005 12:32:43 -0400 Subject: Re: Pointers in comparison expressions From: Daniel Berlin To: mrc.lrn@inwind.it Cc: gcc@gcc.gnu.org In-Reply-To: <200507121825.45472.mrc.lrn@inwind.it> References: <200507121825.45472.mrc.lrn@inwind.it> Content-Type: text/plain Date: Tue, 12 Jul 2005 16:32:00 -0000 Message-Id: <1121185961.13154.50.camel@linux-009002219143> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-07/txt/msg00506.txt.bz2 > I think that even if the use of relational operators other than '==' and '!=' > is legal with pointers, the compiler should issue a warning (when the option > -Wall is used), as it does for assignment, used as truth values, not > surrounded with parentheses. Why? It's legal, it's useful, and used. --Dan