diff options
Diffstat (limited to 'gcc/builtins.cc')
-rw-r--r-- | gcc/builtins.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/builtins.cc b/gcc/builtins.cc index 5fc89adf01b..b9d89b409b8 100644 --- a/gcc/builtins.cc +++ b/gcc/builtins.cc @@ -613,7 +613,7 @@ c_strlen (tree arg, int only_value, c_strlen_data *data, unsigned eltsize) if (eltsize != tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (src))))) return NULL_TREE; - /* Set MAXELTS to sizeof (SRC) / sizeof (*SRC) - 1, the maximum possible + /* Set MAXELTS to ARRAY_SIZE (SRC) - 1, the maximum possible length of SRC. Prefer TYPE_SIZE() to TREE_STRING_LENGTH() if possible in case the latter is less than the size of the array, such as when SRC refers to a short string literal used to initialize a large array. |