| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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: | "Alex Vinokur" <alexvn AT connect DOT to> |
| Subject: | Re: gcc -dM -E -xc /dev/null & g++ -dM -E -xc /dev/null |
| Date: | Tue, 14 Oct 2003 06:38:21 +0200 |
| Lines: | 65 |
| Message-ID: | <bmfukm$l24$1@sea.gmane.org> |
| References: | <20031013053048 DOT GA16401 AT redhat DOT com> <20031013165209 DOT 13552 DOT qmail AT web21408 DOT mail DOT yahoo DOT com> <bmf1m5$hsj$1 AT sea DOT gmane DOT org> |
| X-Complaints-To: | usenet AT sea DOT gmane DOT org |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 6.00.2800.1106 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1106 |
"Ross Smith" <rosss AT pharos DOT co DOT nz> wrote in message news:bmf1m5$hsj$1 AT sea DOT gmane DOT org...
> Rick Rankin wrote:
> > --- Christopher Faylor <cgf-rcm AT cygwin DOT com> 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.
>
[snip]
Thanks.
Now it seems to be OK.
$ g++ -dM -E -xc /dev/null > out_c
$ g++ -dM -E -xc++ /dev/null > out_c++
$ diff out_c out_c++
$ diff out_c out_c++
28a29
> #define __EXCEPTIONS 1
30a32
> #define __GXX_WEAK__ 1
43a46
> #define __WCHAR_UNSIGNED__ 1
50a54
> #define __cplusplus 1
51a56
> #define __DEPRECATED 1
53a59
> #define __GNUG__ 3
=====================================
Alex Vinokur
mailto:alexvn AT connect DOT to
http://mathforum.org/library/view/10978.html
news://news.gmane.org/gmane.comp.lang.c++.perfometer
=====================================
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |