[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com
--- Comment #8 from hongleij at 126 dot com 2006-12-31 02:24 --- (In reply to comment #7) > Invalid as explained by me and Gaby. > yes,it's my misuse. really sorry for my wrong report. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30331

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com
--- Comment #4 from hongleij at 126 dot com 2006-12-30 13:48 --- (In reply to comment #3) > the question is : if a const member function can call a non_const member > function > without const_cast, > if fun() changed the member in A,like this: > //const_test.cpp >

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com
--- Comment #3 from hongleij at 126 dot com 2006-12-30 13:46 --- the question is : if a const member function can call a non_const member function without const_cast, if fun() changed the member in A,like this: //const_test.cpp struct A { A(unsigned int n) { aa=n

[Bug c++/30331] New: a const member function can call a non_const member function without const_cast

2006-12-29 Thread hongleij at 126 dot com
rsion: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hongleij at 126 dot com GCC host triplet: all http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30331