From f5024ff092b611cf4d45e51037b5d84409457d43 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 22 Apr 2014 11:08:30 -0400 Subject: [PATCH] callee.exp: fix inline compilation GCC won't emit a warning if we also use the inline keyword. --- testsuite/systemtap.base/callee.exp | 5 +---- testsuite/systemtap.base/callee.inlined.c | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/testsuite/systemtap.base/callee.exp b/testsuite/systemtap.base/callee.exp index a4dd3c61f..a8bfd14ec 100644 --- a/testsuite/systemtap.base/callee.exp +++ b/testsuite/systemtap.base/callee.exp @@ -36,11 +36,8 @@ proc compile_subtest { {n 1} } { incr n -1 } - # We have to turn off -Wattributes because some C subtests use the - # ((always_inline)) attribute, which emits a warning set res [target_compile [concat $sources] ${test} \ - executable "additional_flags=-O additional_flags=-g \ - additional_flags=-Wno-attributes"] + executable "additional_flags=-O additional_flags=-g"] if { $res != "" } { return 1 } return 0 } diff --git a/testsuite/systemtap.base/callee.inlined.c b/testsuite/systemtap.base/callee.inlined.c index 2fd124b3f..6d672f834 100644 --- a/testsuite/systemtap.base/callee.inlined.c +++ b/testsuite/systemtap.base/callee.inlined.c @@ -5,19 +5,19 @@ // can't be too simple either, otherwise we won't even have an inline instance. __attribute__((always_inline)) -int baz(int a, int b) { +inline int baz(int a, int b) { return a + b; } __attribute__((always_inline)) -int foo(int a, int b) { +inline int foo(int a, int b) { int c = a*2 + b; c = baz(b, c); return c; } __attribute__((always_inline)) -int bar(int a, int b) { +inline int bar(int a, int b) { int c = a + b; c = foo(c, a*b); return c; -- 2.43.5