From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30408 invoked by alias); 31 Dec 2002 16:32:41 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30401 invoked from network); 31 Dec 2002 16:32:40 -0000 Received: from unknown (HELO hromime01.veritas.com) (207.30.27.2) by 209.249.29.67 with SMTP; 31 Dec 2002 16:32:40 -0000 Received: from lmoxch04.veritas.com (unverified) by hromime01.veritas.com (Content Technologies SMTPRS 4.2.10) with ESMTP id ; Tue, 31 Dec 2002 11:32:28 -0500 Received: by LMOXCH04 with Internet Mail Service (5.5.2656.59) id ; Tue, 31 Dec 2002 11:32:28 -0500 Message-ID: <8BE017CC8923D511A00A0008C78605EE03A5E103@LMOXCH04> From: Martin York To: 'Stephen Lindholm' , Neil Booth Cc: gcc@gcc.gnu.org Subject: RE: Change in preprocessor behavior Date: Tue, 31 Dec 2002 10:24:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002-12/txt/msg01645.txt.bz2 I may be wrong (I don't have a machine close by with gcc on). Try adding the -v flag to your compile. This shows all the flags passed to the underlying frontend (cc1plus) Then you can compare the flags used on Solaris and OS-X. You will then be able to see if -traditional is being passed to cc1plus on your OS-X machine I also believe you can override the flags passed to the frontend by specifying a specs file on the command line (though I have never tried this myself). This may be simpler then rebuilding gcc. Martin. -----Original Message----- From: Stephen Lindholm [mailto:lindholm@CS.Stanford.EDU] Sent: 30 December 2002 18:46 To: Neil Booth Cc: gcc@gcc.gnu.org Subject: Re: Change in preprocessor behavior I'm using the version of gcc which came with Mac OS X, and I compared it to the old version of gcc installed on the Solaris mail server. I did not install either of the two compilers myself. I did cut and paste the command line and output exactly as they were in the terminal window. I guess the OS X compiler came out of the box configured differently than I expected. I know it has some modifications to support Mac programming, but I did not expect the preprocessor to be configured differently. I guess I will just have to use a different computer for my preprocessing or install another version of gcc. Thank you for your help. On Mon, 30 Dec 2002, Neil Booth wrote: > Stephen Lindholm wrote:- > > > thrush:~% cpp test2 > > # 1 "test2" > > > > > > struct command commands[] = > > { > > { #quit, quit ## _command }, > > { #help, help ## _command }, > > }; > > Contrary to your claim, I suspect you're using cpp -traditional, no? > > Traditional preprocessors did not support # and ##, and 3.1 is more > "correct" in this respect. FWIW 3.3 has another new implementation of > traditional preprocessing which is the most faithful of GCC's > implementations to true traditional preprocessing. > > Neil. >