This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch, master, updated. glibc-2.14-377-gaa78043


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  aa78043a4aafe5db1a1a76d544a833b63b4c5f5c (commit)
      from  ad0f5cad15f1c76faf3843b3e189dead2c05cfcc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa78043a4aafe5db1a1a76d544a833b63b4c5f5c

commit aa78043a4aafe5db1a1a76d544a833b63b4c5f5c
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Sun Oct 16 21:29:11 2011 -0400

    Use leaf function attribute in __THROW

diff --git a/ChangeLog b/ChangeLog
index c71959c..dfd6a3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-10-16  Ulrich Drepper  <drepper@gmail.com>
 
+	* misc/sys/cdefs.h: Use leaf function attribute in __THROW.
+
 	* sysdeps/ieee754/dbl-64/s_ceil.c: Avoid alias renamed.
 	* sysdeps/ieee754/dbl-64/s_floor.c: Likewise.
 	* sysdeps/ieee754/dbl-64/s_rint.c: Likewise.
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 165a94a..bef8be7 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -38,18 +38,27 @@
 
 #ifdef __GNUC__
 
+/* All functions, except those with callbacks, are leaf functions.  */
+# if __GNUC_PREREQ (4, 6) && !defined _LIBC
+#  define __LEAF , __leaf__
+#  define __LEAF_ATTR __attribute__ ((__leaf__))
+# else
+#  define __LEAF
+#  define __LEAF_ATTR
+# endif
+
 /* GCC can always grok prototypes.  For C++ programs we add throw()
    to help it optimize the function calls.  But this works only with
    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
 # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
-#  define __THROW	__attribute__ ((__nothrow__))
-#  define __NTH(fct)	__attribute__ ((__nothrow__)) fct
+#  define __THROW	__attribute__ ((__nothrow__ __LEAF_ATTR))
+#  define __NTH(fct)	__attribute__ ((__nothrow__ __LEAF_ATTR)) fct
 # else
 #  if defined __cplusplus && __GNUC_PREREQ (2,8)
 #   define __THROW	throw ()
-#   define __NTH(fct)	fct throw ()
+#   define __NTH(fct)	__LEAF_ATTR fct throw ()
 #  else
 #   define __THROW
 #   define __NTH(fct)	fct

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    2 ++
 misc/sys/cdefs.h |   15 ++++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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