comp.lang.ada
 help / color / mirror / Atom feed
From: snarflemike@yahoo.com (Mike Silva)
Subject: Re: ANN: New technical paper from Ada Europe 2004 now available
Date: 1 Jul 2004 08:04:29 -0700
Date: 2004-07-01T08:04:29-07:00	[thread overview]
Message-ID: <20619edc.0407010704.470cc87@posting.google.com> (raw)
In-Reply-To: 1088612188.693737@master.nyc.kbcfp.com

Hyman Rosen <hyrosen@mail.com> wrote in message news:<1088612188.693737@master.nyc.kbcfp.com>...
> Rod Chapman wrote:
> > "High-Integrity Ada in a UML and C World", Peter Amey and Neil White
> 
> The automatically generated C in this paper contains
> 
>      typedef Colour_ADT_RGB_Value Colour_ADT_Colour[3];
>      void Colour_ADT_SWAP(Colour_ADT_Colour *A, Colour_ADT_Colour *B)
>      {
>          Colour_ADT_Colour Temp;
>          memmove((void*)Temp,(void*)A,6);
>          memmove((void*)A,(void*)B,6);
>          memmove((void*)B,(void*)Temp,6);
>      }
> 
> Those memmoves exhibit bad C style.

Isn't it really straining to complain about the style (not
correctness, but style) of automatically generated code?  It's just an
intermediate step from the source to the binary, which in this case
happens to be human-readable in order to use a particular set of
tools.  BTW, you didn't point out that Colour_ADT_Colour is never
defined.  That would have been a better criticism! :)

Mike



  reply	other threads:[~2004-07-01 15:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 14:46 ANN: New technical paper from Ada Europe 2004 now available Rod Chapman
2004-06-30 16:16 ` Hyman Rosen
2004-07-01 15:04   ` Mike Silva [this message]
2004-07-01 15:59     ` Hyman Rosen
2004-07-02 10:31       ` Peter Amey
2004-07-02 13:33         ` Hyman Rosen
2004-07-02 18:45           ` Wes Groleau
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox