This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: compiler standards (and/or min gcc version) supported withinstalled headers ?
On Thu, 3 Jan 2013, Andreas Jaeger wrote:
> What about clang, icc etc? We do want to have the framework to support it. So,
> since builtin_memset is a GCC extension, I would add a feature macro around
> it. If then e.g. clang understands it as well, we can define
> GLIBC_HAVE_BUILTIN_MEMSET for clang,
Yes. (In practice other compilers tend to define __GNUC__ /
__GNUC_MINOR__ to pretend to be e.g. GCC 4.2
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-May/021389.html>, so the
non-__GNUC__ cases are probably more theoretical than older GCC. But
there may be cases where a feature used by the headers is *not* supported
by some other compiler that pretends to be a GCC version supporting it -
in which case the conditions on the feature macro would *avoid* defining
it for the other compiler.)
--
Joseph S. Myers
joseph@codesourcery.com