diff options
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/c-aux-info.c | 4 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 4 | ||||
-rw-r--r-- | gcc/c/gimple-parser.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/gcc/c/c-aux-info.c b/gcc/c/c-aux-info.c index bae5757..81860cb 100644 --- a/gcc/c/c-aux-info.c +++ b/gcc/c/c-aux-info.c @@ -67,12 +67,12 @@ affix_data_type (const char *param) for (;;) { - if (!strncmp (p, "volatile ", 9)) + if (startswith (p, "volatile ")) { p += 9; continue; } - if (!strncmp (p, "const ", 6)) + if (startswith (p, "const ")) { p += 6; continue; diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index 5bdc673..c3b85da 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -3113,7 +3113,7 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc, orig_fundecl = fundecl; /* Atomic functions have type checking/casting already done. They are often rewritten and don't match the original parameter list. */ - if (name && !strncmp (IDENTIFIER_POINTER (name), "__atomic_", 9)) + if (name && startswith (IDENTIFIER_POINTER (name), "__atomic_")) origtypes = NULL; } if (TREE_CODE (TREE_TYPE (function)) == FUNCTION_TYPE) @@ -3199,7 +3199,7 @@ build_function_call_vec (location_t loc, vec<location_t> arg_loc, nargs, argarray, &arg_loc); if (name != NULL_TREE - && !strncmp (IDENTIFIER_POINTER (name), "__builtin_", 10)) + && startswith (IDENTIFIER_POINTER (name), "__builtin_")) { if (require_constant_value) result diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c index 58b161b..3a6e72e 100644 --- a/gcc/c/gimple-parser.c +++ b/gcc/c/gimple-parser.c @@ -131,7 +131,7 @@ static void c_parser_gimple_expr_list (gimple_parser &, vec<tree> *); static bool c_parser_gimple_parse_bb_spec (tree val, int *index) { - if (strncmp (IDENTIFIER_POINTER (val), "__BB", 4) != 0) + if (!startswith (IDENTIFIER_POINTER (val), "__BB")) return false; for (const char *p = IDENTIFIER_POINTER (val) + 4; *p; ++p) if (!ISDIGIT (*p)) |