diff options
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/8.2.1-notes.rst | 4 | ||||
-rw-r--r-- | docs/users_guide/using-warnings.rst | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst index c176a0867a..89886304bd 100644 --- a/docs/users_guide/8.2.1-notes.rst +++ b/docs/users_guide/8.2.1-notes.rst @@ -56,6 +56,10 @@ Compiler and the latter code has no restrictions about whether the data constructors of ``T`` are in scope. +- Add warning flag :ghc-flag:`-Wcpp-undef` which passes ``-Wundef`` to the C + pre-processor causing the pre-processor to warn on uses of the ``#if`` + directive on undefined identifiers. + GHCi ~~~~ diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index c07058a4ef..c9216b9307 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -1007,6 +1007,12 @@ of ``-W(no-)*``. be inlined before the rule has a chance to fire. See :ref:`rules-inline`. +.. ghc-flag:: -Wcpp-undef + + This flag passes ``-Wundef`` to the C pre-processor (if its being used) + which causes the pre-processor to warn on uses of the `#if` directive on + undefined identifiers. + If you're feeling really paranoid, the :ghc-flag:`-dcore-lint` option is a good choice. It turns on heavyweight intra-pass sanity-checking within GHC. (It checks GHC's sanity, not yours.) |