mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-06 02:53:52 +08:00
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
This commit is contained in:
parent
73e8165a68
commit
6bfb7f1068
@ -1,3 +1,9 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user