[petsc-dev] PETSC_TRUE and PETSC_TRUTH
Satish Balay
balay at mcs.anl.gov
Thu Sep 2 14:04:12 CDT 2010
On Thu, 2 Sep 2010, Chetan Jhurani wrote:
> Hi petsc-dev,
>
> This is a minor enhancement request.
>
> Using PETSC_TRUTH instead of PETSC_TRUE unintentionally will lead to
> unexpected results and annoying bugs. Seems like PETSC_TRUTH is
> a different enum value for enumerating data types and currently equals 9.
>
> g++ does warn on comparing different enum types, but gcc does not (v4.3.0).
>
> Any possibility of changing the name of PETSC_TRUTH to something
> that is far away from PETSC_TRUE?
Perhaps we should use PETSC_BOOL instead of PETSC_TRUTH..
Satish
More information about the petsc-dev
mailing list