Indefinite-length array as member of struct: how?

David Olix dwho at nmtsun.nmt.edu
Thu Jul 13 05:09:49 AEST 1989


In article <18492 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>Thus,
>
>	char string[SIZE];
>
>	*string = <any integer expression>;
>
>is legal ...

I am not one to be picky (usually), but isn't *string (a.k.a. string[0])
of type char?  If so, any expression yeilding a result of type char
would be legal.  Yes, an integer expression would also be legal, but
depending on the result of the expression and the sizes of char and int on
the particular machine you could end up losing bits.

--David Olix (dwho at nmtsun.nmt.edu)



More information about the Comp.lang.c mailing list