Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - compiler allows assign to const variable
Version 8.40.2 of the compiler does not catch this const violation. struct test { int data[5]; }; void foo(test const& aa) { aa.data[0]= 0; //compiler allows assign to const variable } int main() { test aa; foo(aa); } Mar 31 2004
Steve Strand wrote:Version 8.40.2 of the compiler does not catch this const violation. struct test { int data[5]; }; void foo(test const& aa) Apr 01 2004
Hello, -scooter- wrote...void foo(test const& aa) Apr 02 2004
"-scooter-" <scottm cs.ucla.edu> wrote in message news:c4ho5t$pnd$1 digitaldaemon.com...Steve Strand wrote:Version 8.40.2 of the compiler does not catch this const violation. struct test { int data[5]; }; void foo(test const& aa) Apr 03 2004
Matthew wrote:Version 8.40.2 of the compiler does not catch this const violation. struct test { int data[5]; }; void foo(test const& aa) Apr 06 2004
|