Help me cast this!

Karl Heuer karl at haddock.ISC.COM
Sat May 14 04:48:30 AEST 1988


In article <3817 at diku.dk> thorinn at diku.dk (Lars Henrik Mathiesen) writes:
>The next problem is with compiler writers who insist on warning about
>[possible alignment problems] on compilation.  They will have to put in
>support for /*MAXALIGN*/...  Or use a #pragma.  Or their users will have to
>live with the warnings (most probable?).

If they're going to add the warning message, they'd better make damn sure that
"int *ip = (int *)malloc(sizeof(int));", which is perfectly valid, not produce
the warning.  "Live with the warnings" is unacceptable.

If it's true that #pragma is not allowed to change the semantics of a program,
then this may be an excellent example of what it *is* good for.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list