Re: Simple question

From: Edward Almasy (almasy@axis.com)
Date: 12/13/95


Tel Janin Aellinsar writes:
> On Wed, 13 Dec 1995, Alastair J Neil wrote:
> > Tel Janin Aellinsar wrote:
> > > On Tue, 12 Dec 1995, Alastair J Neil wrote:
> > > > thus spake d hall
> > > > >it does work with GCC, since it's smart enough to implicitly typecast.
> > > > >
> > > > >Michael> ch->player.height = ch->player.height * 3 / 4;
> > > > >
> > > > >this might save the work of typecasting, but it varies based upon the
> > > > >platform and compiler.
> > > >
> > > > why should this vary from platfom and compiler?  The precedence of
> > > > operators is defined in the ansi standard.
> > > 
> > > And since when has any C compiler followed completely the ANSI standard?
> > 
> > Well if your compiler purports to be an ANSI compiler and supports some
> > other operator presednce then it is broken and you should complain
> > to the vendor.  Do you want to claim that because some compilers are
> > broken you can't write ansi complient code?
> 
> No, I want to claim that some compilers support "extensions" that you 
> have to shut off to get anything even remotely ANSI-complaint.

This is ridiculous.  I've been writing strict ANSI-compliant code with
gcc for the last five years, and I have yet to run into any code that
doesn't behave under gcc as dictated by the ANSI spec.

If you write ANSI-compliant code then 99.99999% of the time your code
will compile fine under gcc or any other ANSI-compliant compiler.  If
you don't agree with this then please cite an example of (normal MUD)
code where this isn't true.  Certainly nothing I've seen in the current
discussion falls into this category.

Discouraging novice C programmers from trying to adhere to the ANSI C
standard does everyone here a disservice.


 \_\_\_     _/ \_\_\_  axis data: specializing in online system setup & design
 \_  \_     _/ \_  \_    Edward Almasy                       almasy@axis.com  
 \_\_\_     _/ \_\_\_    President: Axis Data       Proprietor: NineJackNine
     \_ _/  _/     \_    608-256-5732 (voice)            608-256-5697 (data)
 \_\_\_ _/_/_/ \_\_\_  9jack9: on the bleeding edges of culture and technology



This archive was generated by hypermail 2b30 : 12/07/00 PST