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

[obv] testsuite: gdb.python/py-frame-inline.c fix for gcc-4.7


Hi,

gdb compile failed, gdb/testsuite/gdb.python/py-frame-inline.c:21:1: warning: always_inline function might not be inlinable [-Wattributes]
with
gcc (GCC) 4.7.0 20111222 (experimental)

According to:
http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00608.html
# A function not declared inline with an always_inline attribute is a bug.
# So, the patch looks ok to me.

and it really works.  Checked it in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-12/msg00229.html

--- src/gdb/testsuite/ChangeLog	2011/12/23 14:49:53	1.2998
+++ src/gdb/testsuite/ChangeLog	2011/12/23 14:57:39	1.2999
@@ -5,6 +5,9 @@
 	into XFAIL "new without size_t".  Permit size_t for the KFAIL case.
 	Add comment to add a PASS case in the future.
 
+	Fix compatibility with gcc-4.7.
+	* gdb.python/py-frame-inline.c (f): Use inline for __always_inline__.
+
 2011-12-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
 	PR tdep/12797
--- src/gdb/testsuite/gdb.python/py-frame-inline.c	2011/04/17 14:14:23	1.1
+++ src/gdb/testsuite/gdb.python/py-frame-inline.c	2011/12/23 14:57:39	1.2
@@ -17,7 +17,7 @@
 
 volatile int v = 42;
 
-__attribute__((__always_inline__)) static int
+__attribute__((__always_inline__)) static inline int
 f (void)
 {
   /* Provide first stub line so that GDB understand the PC is already inside


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