@@ -1554,6 +1554,11 @@ build_contract_condition_function (tree fndecl, bool pre)
15541554 /* The handlers are void fns. */
15551555 TREE_TYPE (fn) = build_function_type (void_type_node, arg_types);
15561556
1557+ /* Disable warnings for all the parameters */
1558+ for (tree p = DECL_ARGUMENTS (fn); p && p!=void_list_node;
1559+ p = TREE_CHAIN (p))
1560+ suppress_warning (p);
1561+
15571562 if (DECL_IOBJ_MEMBER_FUNCTION_P (fndecl))
15581563 TREE_TYPE (fn) = build_method_type (class_type, TREE_TYPE (fn));
15591564
@@ -1591,7 +1596,7 @@ build_contract_condition_function (tree fndecl, bool pre)
15911596 /* Update various inline related declaration properties. */
15921597 // DECL_DECLARED_INLINE_P (fn) = true;
15931598 DECL_DISREGARD_INLINE_LIMITS (fn) = true ;
1594- TREE_NO_WARNING (fn) = true ;
1599+ suppress_warning (fn);
15951600
15961601 return fn;
15971602}
@@ -1932,6 +1937,7 @@ build_contract_wrapper_function (tree fndecl, bool is_cvh,
19321937 TREE_CHAIN (last) = void_list_node;
19331938 break ;
19341939 }
1940+ suppress_warning (p);
19351941 last = TREE_CHAIN (last) = copy_decl (p);
19361942 DECL_CONTEXT (last) = wrapdecl;
19371943 }
@@ -1962,7 +1968,7 @@ build_contract_wrapper_function (tree fndecl, bool is_cvh,
19621968 /* Update various inline related declaration properties. */
19631969 // DECL_DECLARED_INLINE_P (wrapdecl) = true;
19641970 DECL_DISREGARD_INLINE_LIMITS (wrapdecl) = true ;
1965- TREE_NO_WARNING (wrapdecl) = true ;
1971+ suppress_warning (wrapdecl);
19661972
19671973 return wrapdecl;
19681974}
0 commit comments