Commit 6bfb7f10 by Simon Baldwin Committed by Simon Baldwin

re PR c++/35652 (offset warning should be given in the front-end)

       PR c/35652
       * builtins.c (c_strlen): Suppressed multiple warnings that can occur
       with propagated string constants.

From-SVN: r134714
parent 73e8165a
2008-04-26 Simon Baldwin <simonb@google.com>
PR c/35652
* builtins.c (c_strlen): Suppressed multiple warnings that can occur
with propagated string constants.
2008-04-26 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
......
......@@ -447,7 +447,12 @@ c_strlen (tree src, int only_value)
runtime. */
if (offset < 0 || offset > max)
{
warning (0, "offset outside bounds of constant string");
/* Suppress multiple warnings for propagated constant strings. */
if (! TREE_NO_WARNING (src))
{
warning (0, "offset outside bounds of constant string");
TREE_NO_WARNING (src) = 1;
}
return NULL_TREE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment