From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32512 invoked by alias); 23 May 2002 09:16:07 -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 32455 invoked by uid 71); 23 May 2002 09:16:02 -0000 Resent-Date: 23 May 2002 09:16:02 -0000 Resent-Message-ID: <20020523091602.32454.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, avd@openlinksw.com Received:(qmail 32233 invoked by uid 61); 23 May 2002 09:14:19 -0000 Message-Id:<20020523091419.32232.qmail@sources.redhat.com> Date: Thu, 23 May 2002 02:16:00 -0000 From: avd@openlinksw.com Reply-To: avd@openlinksw.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: preprocessor/6779: -O option causes preprocessing problems X-SW-Source: 2002-05/txt/msg00710.txt.bz2 List-Id: >Number: 6779 >Category: preprocessor >Synopsis: -O option causes preprocessing problems >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu May 23 02:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: avd@openlinksw.com >Release: gcc-3.1 >Organization: >Environment: Linux on x86, glibc 2.2.2 >Description: My problem is akin of one mentioned among "Frequently Reported Bugs" but is slightly different. gcc-3.1 successfully compiles my code when optimization is turned off but fails when it is on. It produces the following error messages: m.c:9:1: directives may not be used inside a macro argument m.c:8:6: unterminated argument list invoking macro "printf" Note that my macro does not have arguments at all. Perhaps printf is also a macro. But if it works without optimization why it fails with it? >How-To-Repeat: Compile the attached program with and without optimization and compare the results: gcc -O m.c gcc m.c >Fix: >Release-Note: >Audit-Trail: >Unformatted: