public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: frey waid <waid@cisco.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: preprocessor/9650: string literal contactenation doesn't work with #include Date: Mon, 10 Feb 2003 23:16:00 -0000 [thread overview] Message-ID: <20030210231601.24201.qmail@sources.redhat.com> (raw) The following reply was made to PR preprocessor/9650; it has been noted by GNATS. From: frey waid <waid@cisco.com> To: Neil Booth <neil@daikokuya.co.uk> 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 15:08:40 -0800 i tried that but it doesn't work consistently with the newer prescan semantics. for example, if i did this: #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? frey Neil Booth wrote: > > frey waid wrote:- > > > that's what i was doing before. so i had this: > > > > #include COMP_INC(comp,file) > > > > #define COMP_INC(comp,file) #comp "/include/" #file > > > > do you have another method in mind? > > Sure 8-) > > #include COMP_INC (comp, file) > > #define COMP_INC(comp, file) COMP (comp, file) > #define COMP(prefix, suffix) str(comp/include/file) > #define str(x) #x > > Not tested, but you get the idea. > > Neil.
next reply other threads:[~2003-02-10 23:16 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-10 23:16 frey waid [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-02-10 23:16 Neil Booth 2003-02-10 23:06 frey waid 2003-02-10 23:06 Neil Booth 2003-02-10 23:06 Neil Booth 2003-02-10 22:57 neil 2003-02-10 22:46 waid
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030210231601.24201.qmail@sources.redhat.com \ --to=waid@cisco.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).