Article View: comp.sys.ibm.pc.programmer
Article #497Re: Borland Turbo C++ 1.0!
From: Mark Giaquinto
Date: Fri, 25 May 1990 17:06
Date: Fri, 25 May 1990 17:06
50 lines
2112 bytes
2112 bytes
I tried to find the orginal article to reply to, but I couldn't so here
I go.
In article jjohnson@urbana.mcd.mot.com (Jeff Johnson) writes:
>My Borland source looked into the missing main() problem:
>] From: darcy@druid.uucp (D'Arcy J.M. Cain)
>] Subject: Does Borland consider main an extension to ANSI?
>] I just thought that this was so weird I wanted to share it. I have the
>] following program.
>] #include <stdio.h>
>] main() { printf("STDC is %d\n", __STDC__); }
>] Compiled under GNU C I get the following expected output:
>] STDC is 1
>] Compiled under Turbo C 2.0 I get an error that __STDC__ is not defined.
>] I compile using the -A switch (disable all non-ANSI extensions) and the
>] program compiles but the linker complains that there is no main function.
>] Looking at the assembler output confirms this. So what's up?
> I checked the program in the note about __STDC__ and at
> least in TC++ 1.0 there is no problem. Since I don't have a
> copy of TC 2.0 anymore, I can't check it.
>This is not much help I suppose, but it is a reason to upgrade. 8-)
>--
>Jeff Johnson +1 217 384 8542 Motorola Inc
On page 239, User's Guide, Turbo C 2.0 it states the following:
"__STDC__ The constant 1, if you commpile with the ANSI
compatibility (-A) flag (ANSI Keywords Only ... ON);
otherwise the macro is undefined.
Compilied the program with the "-A" and it ran fine.
I hope this helps.
--
Winter Wolf (aka Mark Giaquinto) wolf@ariel.unm.edu
669 Black Hawk Dr NE, Albuquerque New Mexico 87122
"All of us get lost in the darkness, Dreamers learn to stear by the stars."
-- Rush
Technical Details
Message-ID:
<2873@ariel.unm.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!mailrus!ncar!unmvax!ariel!wolfShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!mailrus!ncar!unmvax!ariel!wolf From: wolf@ariel.unm.edu (Mark Giaquinto) Newsgroups: comp.sys.ibm.pc.programmer,comp.lang.c++,comp.sys.ibm.pc Subject: Re: Borland Turbo C++ 1.0! Message-ID: <2873@ariel.unm.edu> Date: 25 May 90 17:06:54 GMT Followup-To: comp.sys.ibm.pc.programmer Organization: University of No Money, Albuquerque Lines: 50