Xref: utzoo comp.sys.ibm.pc.programmer:1670 comp.lang.c++:7760 comp.sys.ibm.pc:51267 Path: 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 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 >] 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