diff options
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 359ff64..6cca5fb 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -9199,8 +9199,10 @@ fold_builtin_strstr (tree arglist, tree type) return fold_convert (type, tem); } + /* The argument is const char *, and the result is char *, so we need + a type conversion here to avoid a warning. */ if (p2[0] == '\0') - return s1; + return fold_convert (type, s1); if (p2[1] != '\0') return 0; |