This is the mail archive of the libc-alpha@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]

[PATCH] Add inline keywords


According to http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00608.html,
a function without `inline' with an `always_inline' attribute is a bug.

2011-12-23  Marek Polacek  <polacek@redhat.com>

	* elf/dl-addr.c (determine_info): Add inline keyword.
	* elf/tst-auditmod4b.c (check_avx): Likewise.
	* elf/tst-auditmod6b.c (check_avx): Likewise.
	* elf/tst-auditmod6c.c (check_avx): Likewise.
	* elf/tst-auditmod7b.c (check_avx): Likewise.

--- libc/elf/tst-auditmod4b.c.mp	2011-12-23 16:30:46.806637346 +0100
+++ libc/elf/tst-auditmod4b.c	2011-12-23 16:32:03.652512713 +0100
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
 
 static int avx = -1;
 
-static int
+static inline int
 __attribute ((always_inline))
 check_avx (void)
 {
--- libc/elf/dl-addr.c.mp	2011-12-23 16:30:03.807514251 +0100
+++ libc/elf/dl-addr.c	2011-12-23 16:34:48.496512218 +0100
@@ -1,5 +1,5 @@
 /* Locate the shared object symbol nearest a given address.
-   Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
 #include <ldsodefs.h>
 
 
-static void
+static inline void
 __attribute ((always_inline))
 determine_info (const ElfW(Addr) addr, struct link_map *match, Dl_info *info,
 		struct link_map **mapp, const ElfW(Sym) **symbolp)
--- libc/elf/tst-auditmod6b.c.mp	2011-12-23 16:32:08.885511843 +0100
+++ libc/elf/tst-auditmod6b.c	2011-12-23 16:32:15.252511961 +0100
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
 
 static int avx = -1;
 
-static int
+static inline int
 __attribute ((always_inline))
 check_avx (void)
 {
--- libc/elf/tst-auditmod7b.c.mp	2011-12-23 16:32:36.141511698 +0100
+++ libc/elf/tst-auditmod7b.c	2011-12-23 16:32:44.028512272 +0100
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
 
 static int avx = -1;
 
-static int
+static inline int
 __attribute ((always_inline))
 check_avx (void)
 {
--- libc/elf/tst-auditmod6c.c.mp	2011-12-23 16:32:22.047637254 +0100
+++ libc/elf/tst-auditmod6c.c	2011-12-23 16:32:29.672636815 +0100
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned i
 
 static int avx = -1;
 
-static int
+static inline int
 __attribute ((always_inline))
 check_avx (void)
 {

	Marek


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