From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24240 invoked by alias); 10 Feb 2003 23:16: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 24216 invoked by uid 71); 10 Feb 2003 23:16:01 -0000 Date: Mon, 10 Feb 2003 23:16:00 -0000 Message-ID: <20030210231601.24214.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/9650: string literal contactenation doesn't work with #include Reply-To: Neil Booth X-SW-Source: 2003-02/txt/msg00472.txt.bz2 List-Id: The following reply was made to PR preprocessor/9650; it has been noted by GNATS. From: Neil Booth To: frey waid Cc: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: preprocessor/9650: string literal contactenation doesn't work with #include Date: Mon, 10 Feb 2003 23:09:48 +0000 frey waid wrote:- > i tried that but it doesn't work consistently with the newer prescan semantics. > for example, if i did this: Prescan semantics haven't changed. Apart from removal of the odd segfault ;-) > #include COMP_INC(me, mips/hello.h) > > you'd think it'd expand with the below method: > > #include "me/include/mips/hello.h" > > unfortunately, mips is a predefined macro. so it expands to "1". is there a > work around for this without having to undefine it? No, that's the way C works, because mips is lexed as a token in its own right. You need to use a different path, or #undef mips. Or, latest versions of GCC won't invade your namespace like this with -ansi. Prior versions of GCC were somewhat unpredictable. Neil.