[CLN-list] [PATCH] CL_INLINE: shut up compiler warning due to __attribute__((flatten))

Alexei Sheplyakov varg at theor.jinr.ru
Tue Jan 22 12:17:31 CET 2008


Hello!

On Tue, Jan 22, 2008 at 12:42:01AM +0100, Richard B. Kreckel wrote:
 
> Well, we don't have problems with -Wundef and -Wunused.
> 
> (Except that older versions of GCC appear not to know about Alexei's 
> newly introduced flatten attribute: 
> float/dfloat/division/cl_DF_fceil.cc:21: warning: `flatten' attribute 
> directive ignored.)

---
 src/base/cl_maybe_inline.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/base/cl_maybe_inline.h b/src/base/cl_maybe_inline.h
index 316cc5b..adcd904 100644
--- a/src/base/cl_maybe_inline.h
+++ b/src/base/cl_maybe_inline.h
@@ -100,7 +100,7 @@
  *    a function.
  * 2. It's ignored if the optimization is switched off.
  */
-#ifdef __GNUC__
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && __GNUC__MINOR__ >= 1))
 #define CL_FLATTEN __attribute__((flatten))
 #else
 #define CL_FLATTEN
-- 
1.5.3.7


Best regards,
	Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/cln-list/attachments/20080122/adb13a75/attachment.pgp


More information about the CLN-list mailing list