pointers to structs
Lindsay F. Marshall
lindsay at cheviot.UUCP
Wed Jan 9 19:29:39 AEST 1985
<>
What is the position as regards a) portability, and b) the "standard"
on using the following feature of C :
.
.
struct STYPE *t;
.
.
where the size and shape of STYPE have not been defined and the elements
of t are NEVER accessed - the normal use is that t is assigned a value
from a function call and is then passed to another function, the contents
of the structure are not releveant. This certainly works
on the compilers I have tried it on, but is it "correct"?? (If it is, it's a
tremendous way of reducing the number of include files one needs!!)
Please mail replies if possible, as not all the news has the strength to reach
this far! I will summarise if it is worth it.
Lindsay F. Marshall - Computing Lab., U of Newcastle upon Tyne
ARPA : lindsay%cheviot%newcastle.mailnet at MIT-MULTICS.ARPA
UUCP : <UK>!ukc!cheviot!lindsay
More information about the Comp.lang.c
mailing list