[flang-commits] [flang] [flang] Support for warning and error compiler directives. (PR #151510)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Mon Aug 11 09:55:26 PDT 2025


klausler wrote:

> > The compiler already has `#error`, `#warning`, and other preprocessor directives. What purpose are these new ones for?
> 
> #error and #warning requires preprocessor support. Since these directives are handled at semantic level, the usability is more. Also, looks like some customers are using this features to warn/error unsupported features through these directives.

`#error` and `#warning` are supported in the preprocessor.  I don't understand the usability argument.  Can you show an example from user code?

https://github.com/llvm/llvm-project/pull/151510


More information about the flang-commits mailing list