]> sourceware.org Git - systemtap.git/commitdiff
callee.exp: fix inline compilation
authorJonathan Lebon <jlebon@redhat.com>
Tue, 22 Apr 2014 15:08:30 +0000 (11:08 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Tue, 22 Apr 2014 16:20:47 +0000 (12:20 -0400)
GCC won't emit a warning if we also use the inline keyword.

testsuite/systemtap.base/callee.exp
testsuite/systemtap.base/callee.inlined.c

index a4dd3c61faaa5be06f773f68dd0468f0a89ba7ff..a8bfd14ec708f84b9c9adb49a435310e0e81a7c9 100644 (file)
@@ -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
 }
index 2fd124b3f015305b96ce75e78010ee7fc4ea6230..6d672f83411b4630e70172a5b694d8bcd90e6523 100644 (file)
@@ -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;
This page took 0.029938 seconds and 5 git commands to generate.