fix handling of address_space in casts and assignments
commit449a5e3b13e1ba529c63dc80615e79d2dafe539b
authorAl Viro <viro@ftp.linux.org.uk>
Mon, 9 Jul 2007 22:13:06 +0000 (9 23:13 +0100)
committerJosh Triplett <josh@freedesktop.org>
Tue, 10 Jul 2007 15:37:20 +0000 (10 08:37 -0700)
tree366d676a54e3234fe4b3a8da3ec0950feace3c39
parent5061de9a365cd88307c9162c5a8558d1905b5d70
fix handling of address_space in casts and assignments

Turn FORCE_MOD into storage class specifier (that's how it's
actually used and that makes for much simpler logics).

Introduce explicit EXPR_FORCE_CAST for forced casts; handle it
properly.

Kill the idiocy in get_as() (we end up picking the oddest things
for address space - e.g. if we have int __attribute__((address_space(1))) *p,
we'll get warnings about removal of address space when we do things like
(unsigned short)*p.  Fixed.  BTW, that had caught a bunch of very odd
bogosities in the kernel and eliminated several false positives in there.

As the result, get_as() is gone now and evaluate_cast() got simpler.

Kill the similar idiocy in handling pointer assignments; while we are at it,
fix the qualifiers check for assignments to/from void * (you can't assign
const int * to void * - qualifiers on the left side should be no less than
on the right one; for normal codepath we get that checked, but the special
case of void * skips these checks).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
compile-i386.c
dissect.c
evaluate.c
expand.c
expression.c
expression.h
inline.c
linearize.c
parse.c
show-parse.c
symbol.h