[Bug c++/38870] New: G++ allows modification of data members for a non lvalue object

2009-01-16 Thread stefan dot constantin at gmail dot com
Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stefan dot constantin at gmail dot com GCC build triplet: x86_64-redhat-linux GCC host triplet: x86_64-redhat-linux GCC target triplet: x86_64-redhat-linux http://gcc.gnu.org/bugzilla

[Bug c++/38870] G++ allows modification of data members for a non lvalue object

2009-01-16 Thread stefan dot constantin at gmail dot com
--- Comment #1 from stefan dot constantin at gmail dot com 2009-01-16 12:07 --- Sorry for not mentioning this earlier, the sample program provide compiles without error or warning with g++ -Wall. I expected the compiler to error on the line tester().i = 10; because such a construct