aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index cc9d93e..929ea90 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -469,16 +469,13 @@ c_strlen (tree src, int only_value)
else
offset = tree_low_cst (offset_node, 0);
- /* If the offset is known to be out of bounds, warn, and call strlen at
- runtime. */
+ /* If the offset is known to be out of bounds, the front-end should
+ have warned already. We call strlen at runtime.
+
+ ??? Perhaps we should turn this into an assert and force
+ front-ends to define offsets whtin boundaries. */
if (offset < 0 || offset > max)
{
- /* 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;
}