[Bug c/32023] New: Invalid lvalue in void* increment error inconsitensy

nshmyrev at yandex dot ru gcc-bugzilla@gcc.gnu.org
Mon May 21 14:29:00 GMT 2007


The following program doesn't compile due to invalid lvalue in increment. The
most strange thing is that gcc somehow ignores type coercion

int main ()
{
int **a;
void **b;

*b++;            /* works fine */
*((void **)a)++; / gives error */

return 0;
}


-- 
           Summary: Invalid lvalue in void* increment error inconsitensy
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nshmyrev at yandex dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32023



More information about the Gcc-bugs mailing list