Re: [PATCH][2.6.6-rc3] gcc-3.4.0 fixes

From: H. Peter Anvin
Date: Sun May 16 2004 - 20:01:23 EST


Followup to: <200404292146.i3TLkfI0019612@xxxxxxxxxxxxxx>
By author: Mikael Pettersson <mikpe@xxxxxxxxx>
In newsgroup: linux.dev.kernel
>
> 'ptr' _is_ a char pointer, and the code (visible in the part of
> the patch you didn't include) already performed pointer arithmetic
> on it relying on it being a char pointer. The old code had no
> sane reason at all for updating 'ptr' via a cast-as-lvalue.
>
> cast-as-lvalue is not proper C, has dodgey semantics, and can
> always be replaced by proper C.
>

I don't see how it has dodgey semantics for cast of pointers or
[u]intptr_t to pointers.

IMNSHO the fact that it breaks C++ isn't a good reason to outlaw a
long-documented extension for C.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/