https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
--- Comment #5 from Markus Trippelsdorf ---
Well,
markus@x4 ~ % clang++ -c n.ii
n.ii:6:24: error: member function 'm_fn1' not viable: 'this' argument has type
'const B', but function is not marked const
void m_fn2() const { m_fn1(); }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
--- Comment #4 from Andrew Pinski ---
(In reply to Markus Trippelsdorf from comment #3)
> And the error message is horrible.
The only part of the error message which seems really horrible is the
"" part which is related to bug 54948 (there seems
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
--- Comment #3 from Markus Trippelsdorf ---
And the error message is horrible.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
Markus Trippelsdorf changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
--- Comment #1 from Andrew Pinski ---
So I think GCC is correct here. A is a non-dependent base so it can be looked
at definition time. m_fn1 is not a const qualified either.
Does other compiler reject:
class A {
protected:
void m_fn1();
};
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001
Andrew Pinski changed:
What|Removed |Added
Keywords||rejects-valid
Target Milestone|---