This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 07/14] FreeBSD update of __dead2, etc.
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 19 Apr 2013 11:18:45 +0200
- Subject: Re: [PATCH 07/14] FreeBSD update of __dead2, etc.
- References: <1366204592-27532-1-git-send-email-sebastian dot huber at embedded-brains dot de> <1366204592-27532-7-git-send-email-sebastian dot huber at embedded-brains dot de> <20130418074051 dot GE25188 at calimero dot vinschen dot de> <516FA46B dot 2050908 at embedded-brains dot de>
- Reply-to: newlib at sourceware dot org
On Apr 18 09:44, Sebastian Huber wrote:
> On 04/18/2013 09:40 AM, Corinna Vinschen wrote:
> >On Apr 17 15:16, Sebastian Huber wrote:
> >>--- a/newlib/libc/include/sys/cdefs.h
> >>+++ b/newlib/libc/include/sys/cdefs.h
> >>@@ -147,6 +147,11 @@
> >> #endif /* __GNUC__ || __INTEL_COMPILER */
> >>
> >> /*
> >>+ * Macro to test if we're using a specific version of gcc or later.
> >>+ */
> >>+#define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
> >>+
> >>+/*
> >
> >Is it really necessary to introduce another version of the __GNUC_PREREQ
> >macro? And if we really do that, shouldn't it rather be defined in
> >features.h, alongside the original macro?
>
> I introduced this define here to keep the differences between the
> FreeBSD version as minimal as possible.
>
> From the Newlib to FreeBSD difference we have:
>
> @@ -113,12 +143,7 @@
> /*
> * Macro to test if we're using a specific version of gcc or later.
> */
> -#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
> -#define __GNUC_PREREQ__(ma, mi) \
> - (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
> -#else
> -#define __GNUC_PREREQ__(ma, mi) 0
> -#endif
> +#define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
So you still have a difference, so what? I think it's confusing to
have the __GNUC_PREREQ__ in another file than the __GNUC_PREREQ
definition, so I'd prefer to have it in features.h. But I'm still
not sure we really want two such definitions.
What do others think?
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat