generalized lvalues -- patch outline
Richard Guenther
richard.guenther@gmail.com
Tue Nov 23 16:31:00 GMT 2004
On Tue, 23 Nov 2004 16:57:58 +0100 (CET), Michael Matz <matz@suse.de> wrote:
>
>
> Hi,
>
> On Tue, 23 Nov 2004, Gabriel Dos Reis wrote:
>
> >
> > Probably, this sort of situations probably happen because some people
> > have been encouraged in conceiving programming as an activity of
> > throwing random codes to the compiler and see what happens.
>
> Possible. This is one of the ways to learn programming. And despite what
> the language standard says, to my eyes "(T*)p++" looks like a natural way
> to write p+=sizeof(T), so I'm somewhat sympathetic to programmers using
> this construct.
Especially as it would need
p = (__typeof__(p))((char *)p + sizeof(T));
If you restrict *(T*)p++ to p of char* or void* type, how many broken packages
would be left? I think at least those should be fixed.
Richard.
> Ciao,
> Michael.
>
More information about the Gcc
mailing list