public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu>
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 21:06:00 -0000	[thread overview]
Message-ID: <20020731040600.18540.qmail@sources.redhat.com> (raw)

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

From: Andrew Pinski <pinskia@physics.uc.edu>
To: "David E. Weekly" <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 00:01:00 -0400

 The following will work as expected:
 #define foo(A) { bar->A() }
 foo( methodOfBar );
 
 There is no need for pasting.
 The only need for pasting is where you have two identifiers and 
 you want them to be one identifier.
 
 Thanks,
 Andrew Pinski
 
 
 
 On Tuesday, July 30, 2002, at 11:51 , David E. Weekly wrote:
 
 > Andrew,
 >
 > Thank you for your patient explanation. If I do wish to use the modern
 > preprocessor, is it possible in any way to have some:
 >
 > #define foo(A) { bar-> ## A() }
 > foo( methodOfBar );
 >
 > Or, without resorting to the "traditional" CPP, can it simply 
 > not be done?
 >
 > Yours,
 >  David E. Weekly
 >  Software Developer
 >  There, Inc.
 >
 >
 > -----Original Message-----
 > From: Andrew Pinski [mailto:pinskia@physics.uc.edu]
 > Sent: Tuesday, July 30, 2002 8:42 PM
 > To: David E. Weekly
 > Cc: gcc-gnats@gcc.gnu.org
 > Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting "
 > foo-> ## BAR "
 > Importance: High
 >
 >
 > It is illegal because you are trying to paste together two
 > tokens which do not make one token in terms of the C standard.
 > It has been permanently removed because gcc uses a new
 > preprocessor, this has been this way since 3.0.
 > You might get what you expect from using the option -traditional-cpp.
 >
 > Thanks,
 > Andrew Pinski
 >
 >
 >
 > On Tuesday, July 30, 2002, at 11:30 , David E. Weekly wrote:
 >
 >> Andrew,
 >>
 >> Does the standard allow some way to tack on a method name
 >> (i.e., "is there
 >> another way to do this?"), or has this useful feature simply been
 >> permanently removed?
 >>
 >> Also: why is this construct illegal?
 >>
 >> Yours,
 >>  David E. Weekly
 >>  Software Developer
 >>  There, Inc.
 >>
 >> -----Original Message-----
 >> From: Andrew Pinski [mailto:pinskia@physics.uc.edu]
 >> Sent: Tuesday, July 30, 2002 8:23 PM
 >> To: david@there.com
 >> Cc: gcc-gnats@gcc.gnu.org
 >> Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting "
 >> foo-> ## BAR "
 >> Importance: High
 >>
 >>
 >> What you are doing is illegal according the C standard.
 >>
 >> Thanks,
 >> Andrew Pinski
 >>
 >>
 >>
 >
 >
 >
 


             reply	other threads:[~2002-07-31  4:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 21:06 Andrew Pinski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-30 23:37 neil
2002-07-30 23:36 Neil Booth
2002-07-30 21:26 David E. Weekly
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=20020731040600.18540.qmail@sources.redhat.com \
    --to=pinskia@physics.uc.edu \
    --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).