This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generalized lvalues -- patch outline
Hi,
On Tue, 23 Nov 2004, Andrew Pinski wrote:
> if you had the following:
>
> ((int*)a)++;
>
> the better idea would be:
>
> char *a1 = (char*)a;
> a1 += sizeof(int)/sizeof(char);
> a = (typeof(a))(a1);
Ah, yes ;-)
I disagree. The better idea would have been if the C language would allow
for the first construct. It's shorter, and by giving this rewriting rule
seems also to be easy to define.
Ciao,
Michael.