Older versions of GCC produce a warning when this attribute is used.
Signed-off-by: Aaron Plattner <[email protected]>
---
include/misc.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/misc.h b/include/misc.h
index 1fea73e..193b10f 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -261,13 +261,15 @@ version_compare(uint16_t a_major, uint16_t a_minor,
#define SwapRestL(stuff) \
SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
-#ifdef __GNUC__
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
void __attribute__((error("wrong sized variable passed to swap")))
wrong_size(void);
#else
static inline void wrong_size(void)
{
}
+#endif
+#if !defined(__GNUC__)
static inline void __builtin_constant_p(int x)
{
return 0;
--
1.7.4.1
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel