From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32484 invoked by alias); 31 Jul 2002 06:36: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 32470 invoked by uid 71); 31 Jul 2002 06:36:01 -0000 Date: Tue, 30 Jul 2002 23:36:00 -0000 Message-ID: <20020731063600.32469.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/7452: Preprocessor doesn't allow pasting " foo-> ## BAR " Reply-To: Neil Booth X-SW-Source: 2002-07/txt/msg00806.txt.bz2 List-Id: The following reply was made to PR preprocessor/7452; it has been noted by GNATS. From: Neil Booth 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.