This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 07/14] FreeBSD update of __dead2, etc.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]