explicitly specify -std=gnu89 for gdb.cp/inline-break.exp

Message ID CAENS6EsUSQTajixKzmStvX9KrG-8SaTA=YVO=6MFMpY35Um9FQ@mail.gmail.com
State Committed
Headers

Commit Message

David Blaikie April 11, 2014, 11:58 p.m. UTC
  This test is intending to use gnu style inline rather than the
standard c99 inline semantics. Clang defaults to c99 and the test
breaks for this (and other - there's an inlining debug info quality
bug here too - I'll file a bug and kfail the remaining failures in a
separate patch) reason.
commit 69f01ca2de4a42f336f2656379b90d9a8b6894af
Author: David Blaikie <dblaikie@gmail.com>
Date:   Fri Apr 11 12:45:37 2014 -0700

    Compile inline test with -std=gnu89 explicitly to override Clang's default (-std=c99)
    
    gdb/testsuite/
    	* gdb.opt/inline-break.exp: Explicitly specify -std=gnu89 to
    	override Clang's default.
  

Comments

Doug Evans April 12, 2014, 12:18 a.m. UTC | #1
On Fri, Apr 11, 2014 at 4:58 PM, David Blaikie <dblaikie@gmail.com> wrote:
> This test is intending to use gnu style inline rather than the
> standard c99 inline semantics. Clang defaults to c99 and the test
> breaks for this (and other - there's an inlining debug info quality
> bug here too - I'll file a bug and kfail the remaining failures in a
> separate patch) reason.

LGTM, but add a comment in the code explaining why the gnu89 is there.
  
David Blaikie April 12, 2014, 12:40 a.m. UTC | #2
On Fri, Apr 11, 2014 at 5:18 PM, Doug Evans <dje@google.com> wrote:
> On Fri, Apr 11, 2014 at 4:58 PM, David Blaikie <dblaikie@gmail.com> wrote:
>> This test is intending to use gnu style inline rather than the
>> standard c99 inline semantics. Clang defaults to c99 and the test
>> breaks for this (and other - there's an inlining debug info quality
>> bug here too - I'll file a bug and kfail the remaining failures in a
>> separate patch) reason.
>
> LGTM, but add a comment in the code explaining why the gnu89 is there.

Thanks. Added a comment and committed in
f180a1fb463a6a9ab4a883374120d16770486914.
  
Andrew Pinski April 12, 2014, 2:59 a.m. UTC | #3
On Fri, Apr 11, 2014 at 4:58 PM, David Blaikie <dblaikie@gmail.com> wrote:
> This test is intending to use gnu style inline rather than the
> standard c99 inline semantics. Clang defaults to c99 and the test
> breaks for this (and other - there's an inlining debug info quality
> bug here too - I'll file a bug and kfail the remaining failures in a
> separate patch) reason.

Or better yet, use the gnu_inline attribute on those functions.

Thanks,
Andrew Pinski
  

Patch

diff --git gdb/testsuite/ChangeLog gdb/testsuite/ChangeLog
index ed448c5..f7a4b8e 100644
--- gdb/testsuite/ChangeLog
+++ gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@ 
+2014-04-11  David Blaikie  <dblaikie@gmail.com>
+
+	* gdb.opt/inline-break.exp: Explicitly specify -std=gnu89 to
+	override Clang's default.
+
 2014-04-11  Joel Brobecker  <brobecker@adacore.com>
 
 	Revert the following changes (regressions):
diff --git gdb/testsuite/gdb.opt/inline-break.exp gdb/testsuite/gdb.opt/inline-break.exp
index 21c958a..7eef10a 100644
--- gdb/testsuite/gdb.opt/inline-break.exp
+++ gdb/testsuite/gdb.opt/inline-break.exp
@@ -20,7 +20,7 @@ 
 standard_testfile
 
 if { [prepare_for_testing $testfile.exp $testfile $srcfile \
-          {debug optimize=-O2 additional_flags=-Winline}] } {
+          {debug optimize=-O2 additional_flags=-Winline additional_flags=-std=gnu89}] } {
     return -1
 }