generalized lvalues -- patch outline

Andrew Pinski pinskia@physics.uc.edu
Tue Nov 23 15:15:00 GMT 2004


On Nov 23, 2004, at 9:56 AM, Michael Matz wrote:

> Hi,Practically speaking 4.0 is currently strictly less usefull in some
> aspects for the average C programmer.

The average C programmer would not have thought to use this extension
unless they just decided one day to try it or they actually read the
gcc documentation (which I know almost nobody does).  (We keep getting
bug reports about invalid C++ which explicitly added to the changes
page and in the bug section of the documentation but those people
seems not bothered to read those places.)

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);

-- Pinski



More information about the Gcc mailing list