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

--- Comment #1 from Rui Maciel <rui.maciel at gmail dot com> 2012-05-08 
13:27:24 UTC ---
The same suggestion applies to the cases where a non-const method is called
from a const method, such as in the example below:

<code>
class Foo {
        void bar1() {}
        void bar2() const {
                bar1();
        }
};

int main()
{
        return 0;
}
</code>

The same error message is returned:
<message>
main.c++: In member function ‘void Foo::bar2() const’:
main.c++:4:22: error: passing ‘const Foo’ as ‘this’ argument of ‘void
Foo::bar1()’ discards qualifiers [-fpermissive]
</message>

Reply via email to