http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020
__vic <d.v.a at ngs dot ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #19 from __vic <d.v.a at ngs dot ru> 2011-05-18 10:35:51 UTC --- (In reply to comment #18) > (In reply to comment #15) > > The following code would work anyway: > > No, it would make this ambiguous: > > #include <cstring> > using namespace std; > > int main() > { > strchr("foo", 'f'); > } > > > (In reply to comment #16) > > Yes, workaround is obvious: add the const_cast to the return value. But is > > there a way to do without it? > > Only with assistance from the C library, which is why this is a dup of PR > 33935 Yeah. Seems like it's not possible to do if C-library implementer didn't care about this...