bobmon@iuvax.cs.indiana.edu (RAMontante) (05/25/90)
Re: the v2.0 __STDC__ fluke. Either this was fixed by posted patches or recent releases have it fixed (probably both). My copy has no problem with it when I force "ANSI keywords only".
wolf@ariel.unm.edu (Mark Giaquinto) (05/26/90)
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