Path: utzoo!attcan!lsuc!ncrcan!ziebmef!mdfreed From: mdfreed@ziebmef.uucp (Mark Freedman) Newsgroups: comp.lang.c Subject: Re: portability Message-ID: <1989Jan20.055826.26116@ziebmef.uucp> Date: 20 Jan 89 10:58:25 GMT References: <1354@tank.uchicago.edu> <3377@arcturus> <908@ubu.warwick.UUCP> <9414@smoke.BRL.MIL> Reply-To: mdfreed@ziebmef.UUCP (Mark Freedman) Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 32 In article <9414@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <908@ubu.warwick.UUCP> geoff@emerald.UUCP (Geoff Rimmer) writes: >>Awww come on! The main extensions they have provided are not >>essential to programming in C - a lot of the extensions are things >>like new keywords like >> pascal, fortran, cdecl, far, near, huge. > >Some of us would argue that the ABSENCE of these extensions is more >useful to the portable-C programmer than their presence! I have had >code in the past that used several of these as variable names, etc. >Unless the compiler manages to allow them as user identifiers outside >the context of type declarations, they are bound to get in the way. >(I don't know whether or not MicroSoft's compiler is that clever.) > >>BTW, can anyone tell me if the keyword 'volatile' is part of the ANSI >>standard? (I mean is it true to say that all ANSI C compilers must >>have the keyword volatile WORKING (i.e. semantically as well as >>syntactically)?) > >Certainly. What would be the point if it didn't have to work? The Turbo C 2.0 reference manual alleges that the -A option causes the compiler to ignore non-ANSI extensions, and that Turbo C keywords such as far, near, pascal, etc. may then be used as identifiers. It's possible that Microsoft C has a similar option. btw I see that fstat() is not part of the ANSI stdio lib (unless I've missed something). How does one determine the length of a file in a portable fashion ? bbtw As I recall, Microsoft implements the volatile keyword syntactically but not semantically. Perhaps their motto could be "we're BIG, so we don't HAVE to be good" :-)