Merge pull request #11682 from opensourcerouting/frr-format-gcc-12

tools/gcc-plugins: make GCC 12 compatible
This commit is contained in:
Donald Sharp 2022-07-27 11:44:39 -04:00 committed by GitHub
commit d335feeff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1042,7 +1042,7 @@ check_format_info (function_format_info *info, tree params,
format_ctx.arglocs = arglocs;
check_function_arguments_recurse (check_format_arg, &format_ctx,
format_tree, arg_num);
format_tree, arg_num, OPT_Wformat_);
location_t loc = format_ctx.res->format_string_loc;

View File

@ -982,4 +982,9 @@ static inline void debug_gimple_stmt(const_gimple s)
#define SET_DECL_MODE(decl, mode) DECL_MODE(decl) = (mode)
#endif
#if BUILDING_GCC_VERSION < 12000
#define check_function_arguments_recurse(arg, ctx, tree, num, opt) \
check_function_arguments_recurse(arg, ctx, tree, num)
#endif
#endif