Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1560:69b1bfc9617a
Date: 2014-08-24 20:11 +0200
http://bitbucket.org/cffi/cffi/changeset/69b1bfc9617a/
Log: gcc 4.9 seems to like to inline this huge function. That's a bad
idea in my honest opinion, and triggers warnings too.
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -1243,6 +1243,16 @@
return _convert_error(init, ct->ct_name, expected);
}
+#ifdef __GNUC__
+# if __GNUC__ >= 4
+/* Don't go inlining this huge function. Needed because occasionally
+ it gets inlined in places where is causes a warning: call to
+ __builtin___memcpy_chk will always overflow destination buffer
+ (which is places where the 'ct' should never represent such a large
+ primitive type anyway). */
+__attribute__((noinline))
+# endif
+#endif
static int
convert_from_object(char *data, CTypeDescrObject *ct, PyObject *init)
{
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit