Hello, no error reporting when function and variable have the same name in class. Please do this check and show this error.
We need a testcase.
class toto { enum e {a,b}; e test_example(); e test_example; };
Subject: Re: No error reporting when function and variable have the same name alpha dot super-one at laposte dot net a écrit : > ------- Comment #2 from alpha dot super-one at laposte dot net 2009-04-10 04:47 ------- So I compiled this program: 1 class toto 2 { 3 enum e {a,b}; 4 e test_example(); 5 e test_example; 6 }; 7 8 toto t; with the -Wall option of g++ 4.3.2, I got: test.cc:5: error: declaration of 'toto::e toto::test_example' test.cc:4: error: conflicts with previous declaration 'toto::e toto::test_example()' So that does what you want I guess.
I have not that's in lot of version, my code tested is here: http://www.developpez.net/forums/m4191192-3/
Works everywhere.