aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index e4a8694..53bae59 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -3142,27 +3142,25 @@ expand_builtin_strnlen (tree exp, rtx target, machine_mode target_mode)
return NULL_RTX;
}
- if (lendata.decl
- && !TREE_NO_WARNING (exp)
- && ((tree_int_cst_lt (len, bound))
- || !exact))
+ if (lendata.decl && (tree_int_cst_lt (len, bound) || !exact))
{
location_t warnloc
= expansion_point_location_if_in_system_header (loc);
- if (warning_at (warnloc, OPT_Wstringop_overflow_,
- exact
- ? G_("%K%qD specified bound %E exceeds the size %E "
- "of unterminated array")
- : G_("%K%qD specified bound %E may exceed the size "
- "of at most %E of unterminated array"),
- exp, func, bound, len))
+ if (!TREE_NO_WARNING (exp)
+ && warning_at (warnloc, OPT_Wstringop_overflow_,
+ exact
+ ? G_("%K%qD specified bound %E exceeds the size "
+ "%E of unterminated array")
+ : G_("%K%qD specified bound %E may exceed the "
+ "size of at most %E of unterminated array"),
+ exp, func, bound, len))
{
inform (DECL_SOURCE_LOCATION (lendata.decl),
"referenced argument declared here");
TREE_NO_WARNING (exp) = true;
- return NULL_RTX;
}
+ return NULL_RTX;
}
if (!len)