From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10160 invoked by alias); 6 Jan 2003 22:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10127 invoked by uid 71); 6 Jan 2003 22:36:01 -0000 Resent-Date: 6 Jan 2003 22:36:01 -0000 Resent-Message-ID: <20030106223601.10126.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, michael@moria.de Received: (qmail 6530 invoked from network); 6 Jan 2003 22:26:18 -0000 Received: from unknown (HELO mail.moria.de) (194.97.106.210) by 209.249.29.67 with SMTP; 6 Jan 2003 22:26:18 -0000 Received: (qmail 5685 invoked by uid 0); 6 Jan 2003 22:26:04 -0000 Received: from palantir.moria.de (qmailr@194.97.106.211) by fangorn.moria.de with SMTP; 6 Jan 2003 22:26:04 -0000 Received: (qmail 460 invoked by uid 100); 6 Jan 2003 22:26:03 -0000 Message-Id: <20030106222603.459.qmail@palantir.moria.de> Date: Mon, 06 Jan 2003 22:36:00 -0000 From: michael@moria.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: preprocessor/9203: preprocessor X-SW-Source: 2003-01/txt/msg00373.txt.bz2 List-Id: >Number: 9203 >Category: preprocessor >Synopsis: preprocessor >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Mon Jan 06 14:36:00 PST 2003 >Closed-Date: >Last-Modified: >Originator: Michael Haardt >Release: 3.2 >Organization: >Environment: System: Linux palantir 2.4.20-rc1 #8 Wed Nov 6 23:26:07 CET 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.2/configure --prefix=/usr >Description: The preprocessor allows to compare numbers with identifiers. I am not sure if it's a bug or required by the standard, but even if it is legal, a warning just would have saved me some time. According to the ANSI C grammar (K&R, 2nd edition), the syntax allows the comparison. I can't find a reference concerning semantics. >How-To-Repeat: michael@elrond; cat a.c #if 123" # 1 "" # 1 "a.c" number greater than identifier >Fix: Even if it is legal, which I doubt but can not tell, -Wall should issue a warning. Otherwise of course an error would be nice. The above happened in a comparison of #define constants, of which one was spelled wrong, so it was not substituted. That can easily happen and I would appreciate gcc telling me so. Michael >Release-Note: >Audit-Trail: >Unformatted: