zero length array

Dizio at udel.edu Dizio at udel.edu
Wed Feb 18 01:32:51 AEST 1987


Not to nit pick but is it always true that within the structure 

struct LINE {
        struct header_junk hj;
        char   text[32768];
         } ;

'text' falls immediately after 'hj'?  If not I would be wary
about mallocing sizeof(header_junk) + length.

II.
   Is the following a portable way of finding out where a field
within a structure is located?

    & (((struct any_struct_tag *) 0)->any_field)


Dave DiZio



More information about the Comp.lang.c mailing list