... ehm, we use -Wcast-qual during the bootstrap, thus if I don't want
to break it again, better doing the below too. Seems obvious, by itself.
Paolo.
//////////////////
2011-11-02 Paolo Carlini <paolo.carl...@oracle.com>
PR c++/50956
* builtins.c (fold_builtin_memchr): Fix cast.
Index: builtins.c
===================================================================
--- builtins.c (revision 180778)
+++ builtins.c (working copy)
@@ -8427,7 +8427,7 @@ fold_builtin_memchr (location_t loc, tree arg1, tr
if (target_char_cast (arg2, &c))
return NULL_TREE;
- r = (char *) memchr (p1, c, tree_low_cst (len, 1));
+ r = (const char *) memchr (p1, c, tree_low_cst (len, 1));
if (r == NULL)
return build_int_cst (TREE_TYPE (arg1), 0);