Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Ross Smith Subject: Re: gcc -dM -E -xc /dev/null & g++ -dM -E -xc /dev/null Date: Tue, 14 Oct 2003 09:24:53 +1300 Lines: 35 Message-ID: References: <20031013053048 DOT GA16401 AT redhat DOT com> <20031013165209 DOT 13552 DOT qmail AT web21408 DOT mail DOT yahoo DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en In-Reply-To: <20031013165209.13552.qmail@web21408.mail.yahoo.com> Rick Rankin wrote: > --- Christopher Faylor wrote: > >>On Mon, Oct 13, 2003 at 07:22:28AM +0200, Alex Vinokur wrote: >> >>>gcc -dM -E -xc /dev/null >>> and >>>g++ -dM -E -xc /dev/null >>> produce the same output. >>> >>>Is this a feature or a bug? >> >>It is not a bug. Try it on linux. >> >> >>>How can one know that g++ (not gcc) is invoked? >> >>Isn't the __cplusplus define a feature of c++? I'm too lazy to check if this >>is a g++ extension but I'd be surprised if it was. > > Yes, it's defined in section 16.8 (Predefined macro names) of the ANSI/ISO > standard. The original poster was using the -xc flag, which tells the compiler that the following source file is to be read as C regardless of the file name. I'd expect exactly the same preprocessor output from both frontends in that case. -- Ross Smith ...................... Pharos Systems, Auckland, New Zealand "I virtually never go out of the house with less computing power on my person than the entire North American continent circa 1973." -- Charlie Stross -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/