This is the mail archive of the 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 04/19/2013 11:18 AM, Corinna Vinschen wrote:
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))
-#define	__GNUC_PREREQ__(ma, mi)	0
+#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.

Yes, we have a difference since we define __GNUC_PREREQ__ in terms of __GNUC_PREREQ. What is still the same is the place of the __GNUC_PREREQ__ in cdefs.h including the comment.

If we don't add __GNUC_PREREQ__, then I have to change every usage of __GNUC_PREREQ__ into __GNUC_PREREQ.

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.

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