Skip to content

Commit

Permalink
Reinstate support for NDEBUG.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Feb 29, 2024
1 parent 39c66f2 commit 4cc9166
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/base/base_uses.f90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
! In contrast to CPWARN, the warning counter is not increased
#define CPHINT(msg) CALL cp__h(__SHORT_FILE__,__LINE__,msg)

! CPASSERT can be elided if NDEBUG is defined.
#if defined(NDEBUG)
# define CPASSERT(cond)
#else
# define CPASSERT(cond) IF(.NOT.(cond))CALL cp__a(__SHORT_FILE__,__LINE__)
#endif

! The MARK_USED macro can be used to mark an argument/variable as used. It is intended to make
! it possible to switch on -Werror=unused-dummy-argument, but deal elegantly with, e.g.,
Expand Down

0 comments on commit 4cc9166

Please sign in to comment.