From 522c09bf63a4b235e6fde07a5e389f2a533cfe0f Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 30 May 2014 12:20:50 +0100 Subject: [PATCH] Use attribute to specify the required inlining semantics As suggested by Andrew Pinski. gdb/testsuite/ * gdb.opt/inline-break.c: Fix clang compatibility by specifying gnu_inline semantics via attribute. * gdb.opt/inline-break.exp: Remove -std=c89 now that the test source explicitly specifies the required semantics. --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.opt/inline-break.c | 2 +- gdb/testsuite/gdb.opt/inline-break.exp | 4 +--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9265f2707e3..b09e86e2d25 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-05-30 David Blaikie + + * gdb.opt/inline-break.c: Fix clang compatibility by specifying + gnu_inline semantics via attribute. + * gdb.opt/inline-break.exp: Remove -std=c89 now that the test + source explicitly specifies the required semantics. + 2014-05-30 Maciej W. Rozycki * gdb.reverse/sigall-reverse.exp: Fix a typo. diff --git a/gdb/testsuite/gdb.opt/inline-break.c b/gdb/testsuite/gdb.opt/inline-break.c index 9513eecf2a7..f8a9ec9d318 100644 --- a/gdb/testsuite/gdb.opt/inline-break.c +++ b/gdb/testsuite/gdb.opt/inline-break.c @@ -19,7 +19,7 @@ this file, and should be regenerated if this file is modified. */ #ifdef __GNUC__ -# define ATTR __attribute__((always_inline)) +# define ATTR __attribute__((gnu_inline)) __attribute__((always_inline)) #else # define ATTR #endif diff --git a/gdb/testsuite/gdb.opt/inline-break.exp b/gdb/testsuite/gdb.opt/inline-break.exp index 4ff379ad5ef..21c958a2d5b 100644 --- a/gdb/testsuite/gdb.opt/inline-break.exp +++ b/gdb/testsuite/gdb.opt/inline-break.exp @@ -19,10 +19,8 @@ standard_testfile -# Explicitly specify gnu89 for gnu inline semantics to override Clang's default -# of c99. if { [prepare_for_testing $testfile.exp $testfile $srcfile \ - {debug optimize=-O2 additional_flags=-Winline additional_flags=-std=gnu89}] } { + {debug optimize=-O2 additional_flags=-Winline}] } { return -1 } -- 2.30.2