public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Gregory Nicholls <gnicholls@bluephoenixsolutions.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: preprocessor/7457: failure preprocessing ## directive Date: Thu, 01 Aug 2002 05:46:00 -0000 [thread overview] Message-ID: <20020801124606.21541.qmail@sources.redhat.com> (raw) The following reply was made to PR preprocessor/7457; it has been noted by GNATS. From: Gregory Nicholls <gnicholls@bluephoenixsolutions.com> To: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gnicholls@bluephoenixsolutions.com, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: preprocessor/7457: failure preprocessing ## directive Date: Thu, 01 Aug 2002 08:36:29 -0400 --------------1234E970CAB8843E2902E53D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit OK thanks, This was some old (10yr) code that used to work and then didn't. I wondered about the concat but confess that I'm a bit vague on the pre-processor stuff. Sorry for the trouble. G. neil@gcc.gnu.org wrote: > Synopsis: failure preprocessing ## directive > > State-Changed-From-To: open->closed > State-Changed-By: neil > State-Changed-When: Wed Jul 31 15:20:59 2002 > State-Changed-Why: > Not a bug - please understand what ## means. > > It means: "take the spelling of the LHS, and the spelling > of the RHS, and concatenate the two to form a new token. If the concatenation does not form a valid token, anything goes.". You are trying to create a token > > "libdrv"".so" > > which is not a token (it's two tokens). However, if you just drop the !@#$%^& ##, then you're OK: two strings > concatenate to become one string by the rules of C (post > macro expansion and preprocessing). > > Please read a good description of what ## does. > > Yes, GCC is getting more picky. That's a good thing. > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7457 --------------1234E970CAB8843E2902E53D Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> OK thanks, <br> This was some old (10yr) code that used to work and then didn't. I wondered about the concat but confess that I'm a bit vague on the pre-processor stuff. <br> Sorry for the trouble. <br> G. <p>neil@gcc.gnu.org wrote: <blockquote TYPE=CITE>Synopsis: failure preprocessing ## directive <p>State-Changed-From-To: open->closed <br>State-Changed-By: neil <br>State-Changed-When: Wed Jul 31 15:20:59 2002 <br>State-Changed-Why: <br> Not a bug - please understand what ## means. <p> It means: "take the spelling of the LHS, and the spelling <br> of the RHS, and concatenate the two to form a new token. If the concatenation does not form a valid token, anything goes.". You are trying to create a token <p> "libdrv"".so" <p> which is not a token (it's two tokens). However, if you just drop the !@#$%^& ##, then you're OK: two strings <br> concatenate to become one string by the rules of C (post <br> macro expansion and preprocessing). <p> Please read a good description of what ## does. <p> Yes, GCC is getting more picky. That's a good thing. <p><a href="http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7457">http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7457</a></blockquote> </html> --------------1234E970CAB8843E2902E53D--
next reply other threads:[~2002-08-01 12:46 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-01 5:46 Gregory Nicholls [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-07-31 15:21 neil 2002-07-31 13:16 Zack Weinberg 2002-07-31 12:56 gnicholls
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=20020801124606.21541.qmail@sources.redhat.com \ --to=gnicholls@bluephoenixsolutions.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).