C++ Issue with const char * on strchr

Jochen Schmitt Jochen at herr-schmitt.de
Tue Mar 10 20:53:16 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Haley schrieb:
> Jochen Schmitt wrote:
>
> In include/c++/4.4.0/cstring you should see:
>
> inline char* strchr(char* __s1, int __n) { return
> __builtin_strchr(const_cast<const char*>(__s1), __n); }
>
> I wonder if you have not included the correct header.
>
This definition explains my issue, because you can't pass a const char *
argument to a char * parameter.

But I'm wondering, why this my issue didn't occured on earlier releases
of g++.

Best Regards:

Jochen Schmitt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkm20ygACgkQT2AHK6txfgxOSwCfVurC4Ukn0Gyog8zJUeHp0cn9
ff8An3UMvXF6VZbIzMGSnrqjCanowwVf
=e9WK
-----END PGP SIGNATURE-----




More information about the fedora-devel-list mailing list