Re: Bug in gcc: assignment to non-lvalue

2007-09-20 Thread Michiel de Bondt
becomes different. Regards, Michiel Andrew Pinski schreef: On 9/20/07, Michiel de Bondt <[EMAIL PROTECTED]> wrote: struct string100 { char value[100]; }; strcpy (a[0].value, "Non-lvalue assignment."); // illegal So you basically have: a.operator[](0).value W

Bug in gcc: assignment to non-lvalue

2007-09-20 Thread Michiel de Bondt
Hello all, I think the gcc compiler should not accept assignments to non-lvalues. gcc does this however, but does not execute the assignment (probably the assignment is executed on a copy, but that copy is entirely floating). Here is my code: #include #include #include template class SuperAr