[net.lang.c] \"Vectorizing C compiler for the Cray\"

cottrell@NBS-VMS (04/12/85)

/*
> As a consultant to the above committee, I should mention that, in fact,
> TWO minor modifications to standard C semantics were proposed:  the
> one Dr. Brooks mentioned (I just can't see how people can get so steamed
> up over such a slight modification),

We're steamed because you didn't have to do it in the first place. A few
carefully placed ampersands is a small price to pay, even for someone
like myself who hates to type. Many funxions routinely mangle their
arguments because it doesn't affect the calling routine. Forget about
using the standard library routines unless you either modify them or
all calls to them. For example `strlen(ptr)' must now become 
`strlen(ptr[0])'. Gag me with a microchip!

> and another that will simplify our
> program conversion process IMMENSELY:  we are adding "equivalence" as a
> valid storage class.

Have you thought about using unions? You can even #define names to get
rid of the union names in the main program body.
 
> Still a few details to be worked out, though, before we propose it to
> the C standards committee.

If you've been reading mod.std.c, you've got about a snowball's chance.
Try using the features of the existing language before posing new ones.

	jim		cottrell@nbs
*/

Purtill@MIT-MULTICS.ARPA (Mark Purtill) (04/13/85)

<Fnord>
>> A committee ... is implementing the full C language with one minor
>> modification.  In order to have compatibility with Fortran all subroutine
>> parameters will be passed by address.
>(I just can't see how people can get so steamed
>up over such a slight modification)

People get upset about it because it's /NOT/ a slight modification.
The following sort of thing is very common in C

int 
foo( arg) 
          int arg ;
{
          for( ; arg <= 0 ; arg--){
                    /* do something */
                    }
          }

main()
{
          int arg ;

          arg = 5 ;
          foo( arg) ;
          printf( "%d\n", arg) ;
          }

In real C, this will print 5, because arg is passed by value.  If you
instead pass arg by address, it will print 0, which is WRONG.

The main think, tho, is that this is a pointless change.  You can either
add the "fortran" key-word (which some but not all C compilers have) to
the declaration, OR you can just use pointers where appropriate.


                 Mark
^.-.^  Purtill at MIT-MULTICS
(("))  2-032 MIT Cambrige MA 02139