Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#742 closed bug (Fixed)

Faulty proprocessor logic for DIAGNOSTICS_BIO

Reported by: m.hadfield Owned by:
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description (last modified by arango)

In ROMS/Include/globaldefs.h at lines 765-768 the effect of the following lines...

#if (!defined BIO_FENNEL  && defined DIAGNOSTICS_BIO) || \
    (!defined HYPOXIA_SRM && defined DIAGNOSTICS_BIO)
#  undef DIAGNOSTICS_BIO
#endif

...is to undefine DIAGNOSTICS_BIO unless both BIO_FENNEL and HYPOXIA_SRM are defined.

I suggest...

#if defined DIAGNOSTICS_BIO && !(defined BIO_FENNEL || HYPOXIA_SRM)
#  undef DIAGNOSTICS_BIO
#endif

...or its syllogistic equivalent.


Oops, the defined is missing before HYPOXIA_SRM. We need to have instead:

#if defined DIAGNOSTICS_BIO && \
  !(defined BIO_FENNEL      || defined HYPOXIA_SRM)
#  undef DIAGNOSTICS_BIO
#endif

Change History (3)

comment:1 by arango, 7 years ago

Resolution: Fixed
Status: newclosed

Yes, the suggested one is simpler. Thank you.

comment:2 by wilkin, 7 years ago

I think the correct syntax needs *defined* before HYPOXIA_SRM, i.e.

#if defined DIAGNOSTICS_BIO && !(defined BIO_FENNEL
defined HYPOXIA_SRM)

comment:3 by arango, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.