Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NinaRanns committed Jan 22, 2025
1 parent a07766f commit 8e8888c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gcc/c-family/c.opt
Original file line number Diff line number Diff line change
Expand Up @@ -1964,9 +1964,9 @@ fcontracts-nonattr-client-contracts=
C++ Joined RejectNegative Enum(client_contract_check) Var(flag_contract_nonattr_client_check) Init (0)
-fcontracts-nonattr-client-check=[none|pre|all] Select which contracts will be checked on the client side for non virtual functions

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

fcoroutines
C++ LTO Var(flag_coroutines)
Expand Down
6 changes: 3 additions & 3 deletions gcc/cp/contracts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,7 @@ start_function_contracts (tree decl1)

/* If this is not a client side check and definition side checks are
disabled, do nothing. */
if (!flag_contracts_nonattr_def_contracts &&
if (!flag_contracts_nonattr_definition_check &&
!DECL_CONTRACT_WRAPPER(decl1))
return;

Expand Down Expand Up @@ -2895,7 +2895,7 @@ maybe_apply_function_contracts (tree fndecl)

/* If this is not a client side check and definition side checks are
disabled, do nothing. */
if (!flag_contracts_nonattr_def_contracts &&
if (!flag_contracts_nonattr_definition_check &&
!DECL_CONTRACT_WRAPPER(fndecl))
return;

Expand Down Expand Up @@ -3034,7 +3034,7 @@ finish_function_contracts (tree fndecl)

/* If this is not a client side check and definition side checks are
disabled, do nothing. */
if (!flag_contracts_nonattr_def_contracts &&
if (!flag_contracts_nonattr_definition_check &&
!DECL_CONTRACT_WRAPPER(fndecl))
return;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check that an invocation of a virtual function through the base class does not
// check contracts of the derived function, which are definition side contracts
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-def-contracts=off " }
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-definition-check=off " }

struct Base
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check that an invocation of a virtual function through the base class checks
// the base class contracts when definition side contracts are turned off
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-def-contracts=off -fcontract-continuation-mode=on" }
// { dg-options "-std=c++2a -fcontracts -fcontracts-nonattr -fcontracts-nonattr-definition-check=off -fcontract-continuation-mode=on" }

struct Base
{
Expand Down

0 comments on commit 8e8888c

Please sign in to comment.