Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Combination of "-diag-disable" and "-warn"

nDS
Novice
369 Views

It seems that I am missing a nuance of using these two guys together . . .  As follows:

 

* When I use "-diag-disable=8872" (in particular) and do _not_ use "-warn stderrors", the warning message is suppressed.

 

* When I use "-diag-disable=8872" and do use "-warn stderrors", the (now error) message is shown, with the fairly obvious preface "Cannot disable Fortran error message 8872".

 

This is really unhelpful for the current use case . . .  So, my question is whether there is any way to suppress this diagnostic (preface notwithstanding) in build time error mode?  Thanks.

 

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
360 Views

Warnings can be disabled, errors cannot. In many cases, an error means that the compiler can't determine a correct interpretation of the code, so it can't continue. While standards diagnostics don't fall under that, it doesn't astonish me that if you ask for standards diagnostics to be errors that you can't then disable them.

Either you want to block non-standard usage, or you don't. Pick one. Or use standard-conforming syntax.

Reply