Re: __ has_include() macro implementation can be accepted in GCC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 9, 2012 at 12:38 AM, niXman <i.nixman@xxxxxxxxx> 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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux