Skip to content

LNT004 preprocessor-assumption ​

info enabled by default

A preprocessor condition could not be evaluated and was assumed true.

Why ​

The linter evaluates #if conditions with the build mode's defines to analyse the code the compiler sees. When an expression is beyond its evaluator (function-like macros, unknown operators) the branch is assumed taken: findings in or around it may not match the compiled code.

Suppressing ​

For one occurrence, with the reason on the same line (or alone on the line before the statement):

fortran
! fobis: ignore[LNT004] <why this occurrence is fine>

For the whole project, ignore = LNT004 in the fobos [lint] section.