On 6/23/21 11:09 PM, Jeff Law wrote:


On 6/4/2021 3:41 PM, Martin Sebor via Gcc-patches wrote:
The attached patch replaces the uses of TREE_NO_WARNING in the C front
end with the new suppress_warning(), warning_suppressed_p(), and
copy_warning() APIs.

gcc-no-warning-c.diff

Add support for per-location warning groups.

gcc/c/ChangeLog:

        * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
        warning_suppressed_p, suppress_warning, and copy_no_warning.
        (diagnose_mismatched_decls): Same.
        (duplicate_decls): Same.
        (grokdeclarator): Same.
        (finish_function): Same.
        (c_write_global_declarations_1): Same.
        * c-fold.c (c_fully_fold_internal): Same.
        * c-parser.c (c_parser_expr_no_commas): Same.
        (c_parser_postfix_expression): Same.
        * c-typeck.c (array_to_pointer_conversion): Same.
        (function_to_pointer_conversion): Same.
        (default_function_array_conversion): Same.
        (convert_lvalue_to_rvalue): Same.
        (default_conversion): Same.
        (build_indirect_ref): Same.
        (build_function_call_vec): Same.
        (build_atomic_assign): Same.
        (build_unary_op): Same.
        (c_finish_return): Same.
        (emit_side_effect_warnings): Same.
        (c_finish_stmt_expr): Same.
        (c_omp_clause_copy_ctor): Same.
OK once prereqs are approved.

I've retested this on top of the first patch and pushed r12-1802.

Martin

Reply via email to