From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23760 invoked by alias); 31 Jul 2002 04:26:01 -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 23746 invoked by uid 71); 31 Jul 2002 04:26:01 -0000 Date: Tue, 30 Jul 2002 21:26:00 -0000 Message-ID: <20020731042601.23745.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "David E. Weekly" Subject: RE: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR " Reply-To: "David E. Weekly" X-SW-Source: 2002-07/txt/msg00805.txt.bz2 List-Id: The following reply was made to PR preprocessor/7452; it has been noted by GNATS. From: "David E. Weekly" To: "Andrew Pinski" Cc: Subject: RE: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR " Date: Tue, 30 Jul 2002 21:17:10 -0700 Andrew, Thank you. That obvious answer had escaped me. I'd be happy to have preprocessor/7452 closed as Not A Bug, with your helpful comments below attached. Humbly Yours, David E. Weekly Software Developer There, Inc. -----Original Message----- From: Andrew Pinski [mailto:pinskia@physics.uc.edu] Sent: Tuesday, July 30, 2002 9:01 PM To: David E. Weekly Cc: gcc-gnats@gcc.gnu.org Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR " Importance: High 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 >> >> >> > > >