prev up next   top/contents search

comp.lang.c FAQ list · Question 18.5

Q: How can I shut off the ``warning: possible pointer alignment problem'' message which lint gives me for each call to malloc?


A: A modern lint shouldn't be complaining about this.

Once upon a time, lint did not and could not know that malloc ``returns a pointer to space suitably aligned for storage of any type of object.'' There were various kludgey workarounds for this problem, but today, the void * type exists precisely to encapsulate the notion of a ``generic'' pointer, and an ANSI-compatible lint should understand this.


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North