__ has_include() macro implementation can be accepted in GCC?
Bryan Hundven
bryanhundven@gmail.com
Sun Sep 9 07:56:00 GMT 2012
On Sun, Sep 9, 2012 at 12:38 AM, niXman <i.nixman@gmail.com> wrote:
> Hello,
>
> __has_include() [1] macro implementation can be accepted in GCC(may be
> as GCC extension)?
> Is there any sense to send a patch?
>
>
> [1] http://clang.llvm.org/docs/LanguageExtensions.html#__has_include
I would also be interested in an answer to see if this can become a
part of gcc (as well as the has_warning), but you could just check the
defines a header usually makes:
std_header.h:
#ifndef STD_HEADER_H
#define STD_HEADER_H
...
<stuff>
...
#endif /* STD_HEADER_H
my_c_file.c:
...
#ifdef STD_HEADER_H
<do some stuff that can only be done if that header exists>
#else
<workaround>
#endif
...
> --
> Regards,
> niXman
> ___________________________________________________
> Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
> http://sourceforge.net/projects/mingwbuilds/
-Bryan
More information about the Gcc-help
mailing list