public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Neil Booth <neil@daikokuya.co.uk>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR "
Date: Tue, 30 Jul 2002 23:36:00 -0000	[thread overview]
Message-ID: <20020731063600.32469.qmail@sources.redhat.com> (raw)

The following reply was made to PR preprocessor/7452; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: david@there.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR "
Date: Wed, 31 Jul 2002 07:32:40 +0100

 david@there.com wrote:-
 
 > 	The GNU preprocessor has in the past been able to append method
 > 	names after a "->". It should continue to be able to do so.
 
 It still can.
 
 > 	When in a macro, try to concatenate some "foo->" with a macro parameter
 > 	like BAR; i.e., "foo->##BAR". Note that the preprocessor will complain,
 > 	tossing a warning and the (incorrect) text "foo-> baz" will be tossed
 > 	out. (Assuming macro parameter BAR was set to baz.) Instead, no warning
 > 	should be issued, and the text "foo->baz" should be output.
 
 Why do you feel the need for "##"?  Do you understand what it does?
 If you understand what it does, then you will see that the warning (pre
 3.3) / error (in 3.3) is correct.
 
 C doesn't care about whitespace.  Why do you object to a space being
 after the arrow anyway?
 
 What is wrong with foo->BAR?  That does what you want.
 
 > 	There doesn't seem to be a way to force the preprocessor to accept
 > 	concatenating anything with a left-hand token that ends in "->". =(
 
 Sure there is.  Just don't use ## which does something else.
 
 Neil.


             reply	other threads:[~2002-07-31  6:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 23:36 Neil Booth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-30 23:37 neil
2002-07-30 21:26 David E. Weekly
2002-07-30 21:06 Andrew Pinski
2002-07-30 20:56 David E. Weekly
2002-07-30 20:46 Andrew Pinski
2002-07-30 20:36 David E. Weekly
2002-07-30 20:26 Andrew Pinski
2002-07-30 20:06 david

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=20020731063600.32469.qmail@sources.redhat.com \
    --to=neil@daikokuya.co.uk \
    --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: link
Be 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).