Skip to content

Commit 8e8888c

Browse files
committed
review comments
1 parent a07766f commit 8e8888c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

gcc/c-family/c.opt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,9 +1964,9 @@ fcontracts-nonattr-client-contracts=
19641964
C++ Joined RejectNegative Enum(client_contract_check) Var(flag_contract_nonattr_client_check) Init (0)
19651965
-fcontracts-nonattr-client-check=[none|pre|all] Select which contracts will be checked on the client side for non virtual functions
19661966

1967-
fcontracts-nonattr-def-contracts=
1968-
C++ Var(flag_contracts_nonattr_def_contracts) Enum(on_off) Joined Init(1) RejectNegative
1969-
-fcontracts-nonattr-def-contract=[on|off] Enable or disable contract checks on the definition side for all functions (default on).
1967+
fcontracts-nonattr-definition-check=
1968+
C++ Joined RejectNegative Enum(on_off) Var(flag_contracts_nonattr_definition_check) Init(1)
1969+
-fcontracts-nonattr-definition-check=[on|off] Enable or disable contract checks on the definition side for all functions (default on).
19701970

19711971
fcoroutines
19721972
C++ LTO Var(flag_coroutines)

gcc/cp/contracts.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2774,7 +2774,7 @@ start_function_contracts (tree decl1)
27742774

27752775
/* If this is not a client side check and definition side checks are
27762776
disabled, do nothing. */
2777-
if (!flag_contracts_nonattr_def_contracts &&
2777+
if (!flag_contracts_nonattr_definition_check &&
27782778
!DECL_CONTRACT_WRAPPER(decl1))
27792779
return;
27802780

@@ -2895,7 +2895,7 @@ maybe_apply_function_contracts (tree fndecl)
28952895

28962896
/* If this is not a client side check and definition side checks are
28972897
disabled, do nothing. */
2898-
if (!flag_contracts_nonattr_def_contracts &&
2898+
if (!flag_contracts_nonattr_definition_check &&
28992899
!DECL_CONTRACT_WRAPPER(fndecl))
29002900
return;
29012901

@@ -3034,7 +3034,7 @@ finish_function_contracts (tree fndecl)
30343034

30353035
/* If this is not a client side check and definition side checks are
30363036
disabled, do nothing. */
3037-
if (!flag_contracts_nonattr_def_contracts &&
3037+
if (!flag_contracts_nonattr_definition_check &&
30383038
!DECL_CONTRACT_WRAPPER(fndecl))
30393039
return;
30403040

gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/virtual-func-no-def-check.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check that an invocation of a virtual function through the base class does not
22
// check contracts of the derived function, which are definition side contracts
33
// { dg-do run }
4-
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-def-contracts=off " }
4+
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-definition-check=off " }
55

66
struct Base
77
{

gcc/testsuite/g++.dg/contracts/cpp26/definition-checks/virtual-func-no-def-check2.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check that an invocation of a virtual function through the base class checks
22
// the base class contracts when definition side contracts are turned off
33
// { dg-do run }
4-
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-def-contracts=off -fcontract-continuation-mode=on" }
4+
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-definition-check=off -fcontract-continuation-mode=on" }
55

66
struct Base
77
{

0 commit comments

Comments
 (0)