[cfe-commits] r172643 - /cfe/trunk/docs/LanguageExtensions.rst
Jordan Rose
jordan_rose at apple.com
Wed Jan 16 12:01:05 PST 2013
This confused me because I thought it implied that this was disallowed:
#define HAS_STDIO __has_include(<stdio.h>)
#if HAS_STDIO
// do something
#endif
But this is still allowed. I'm not sure how to rephrase this to make it clearer, though.
On Jan 16, 2013, at 11:51 , Aaron Ballman <aaron at aaronballman.com> wrote:
> Author: aaronballman
> Date: Wed Jan 16 13:51:19 2013
> New Revision: 172643
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172643&view=rev
> Log:
> Adding verbiage to the Language Extensions document about __has_include and __has_include_next only being allowed within preprocessor directives.
>
> Modified:
> cfe/trunk/docs/LanguageExtensions.rst
>
> Modified: cfe/trunk/docs/LanguageExtensions.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.rst?rev=172643&r1=172642&r2=172643&view=diff
> ==============================================================================
> --- cfe/trunk/docs/LanguageExtensions.rst (original)
> +++ cfe/trunk/docs/LanguageExtensions.rst Wed Jan 16 13:51:19 2013
> @@ -140,7 +140,8 @@
> Not all developments systems have the same include files. The
> :ref:`langext-__has_include` and :ref:`langext-__has_include_next` macros allow
> you to check for the existence of an include file before doing a possibly
> -failing ``#include`` directive.
> +failing ``#include`` directive. Include file checking macros must be used
> +as expressions in #if or #elif preprocessing directives.
>
> .. _langext-__has_include:
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list