This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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 requires an lvalue.

Thanks


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]