Lint, (void *) and alignment
Craig Partridge
craig at loki.ARPA
Tue Jul 30 00:19:45 AEST 1985
>Hopefully, pointers of the ANSI C type "void *" will be able to be assigned
>to any other pointer type without any complaints, including complaints about
>possible alignment problems. This is, of course, a horribly large loophole,
>but there may be some small hope that people won't abuse it and will always
>write routines like "malloc" which return "void *" values to align the
>object pointed to so that it can, indeed, be used to point to anything.
I'd prefer it if (void *) could be cast to anything without having
lint complain. I don't want to be able to do something like
void *vp;
char *cp;
cp = vp;
without at least a strong warning from lint that I'm playing with fire.
Craig Partridge
craig at bbn-loki (ARPA)
craig%loki.arpa at csnet-relay (CSNET)
{decvax,ihnp4,wjh12}!bbncca!craig (USENET)
More information about the Comp.lang.c
mailing list