[OT] Re: program that compiles in C but not in C++?
From: Arthur J. O'Dwyer (ajo_at_nospam.andrew.cmu.edu)
Date: 01/11/04
- Previous message: osmium: "Re: Best URLs for a beginner"
- In reply to: Martijn Lievaart: "Re: program that compiles in C but not in C++?"
- Next in thread: Richard Heathfield: "Re: program that compiles in C but not in C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 10 Jan 2004 20:55:57 -0500 (EST)
On Sun, 11 Jan 2004, Martijn Lievaart wrote:
>
> On Sat, 10 Jan 2004 17:38:36 +0000, Richard Heathfield wrote:
> [Martijn wrote:]
> >> So it follows that g++ is only compliant if used with --pedantic?
> > [I]t does indeed appear that g++ is not conforming without the
> > pedantic switch. (That doesn't mean it /is/ conforming /with/ the switch,
> > on which I offer no opinion.)
>
> Yes, bad wording on my part. I ment compliant in this area of course.
> Thanks for the confirmation. I filed a bug report.
This is OT here (gnu.gcc.* would seem appropriate), but I'm almost
positive that the GCC folks don't consider that a "bug," but a feature.
gcc is not *supposed* to be a conforming C compiler in any mode but
-ansi -pedantic, and possibly not even then. By default gcc compiles
a dialect known as "GNU C" that has several extensions to the standard
language. You shouldn't expect it to conform unless you give it the
-ansi option (which IIRC means --std=c89) or the --std=c99 option, and in
the latter case it *still* won't be conforming.
-Arthur
- Previous message: osmium: "Re: Best URLs for a beginner"
- In reply to: Martijn Lievaart: "Re: program that compiles in C but not in C++?"
- Next in thread: Richard Heathfield: "Re: program that compiles in C but not in C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|