public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix compilation errors with clang in gdb.base/advance.c
@ 2020-04-21 15:57 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2020-04-21 15:57 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b32102f6586da0082663c61fed9af2c5aa8b5ba7

commit b32102f6586da0082663c61fed9af2c5aa8b5ba7
Author: Gary Benson <gbenson@redhat.com>
Date:   Tue Apr 21 16:56:09 2020 +0100

    Fix compilation errors with clang in gdb.base/advance.c
    
    Clang fails to compile the above file, with the following errors:
      warning: control reaches end of non-void function [-Wreturn-type]
      warning: too many arguments in call to 'func'
    
    This prevents the following testcases from executing:
      gdb.base/advance.exp
      gdb.base/until-nodebug.exp
    
    gdb/testsuite/ChangeLog:
    
            * gdb.base/advance.c (func): New argument, to match call site.
            (func2, func3): Add return statements.

Diff:
---
 gdb/testsuite/ChangeLog          | 5 +++++
 gdb/testsuite/gdb.base/advance.c | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index affdb63cd76..10c2a01b4b9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-21  Gary Benson <gbenson@redhat.com>
+
+	* gdb.base/advance.c (func): New argument, to match call site.
+	(func2, func3): Add return statements.
+
 2020-04-21  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
 	* gdb.multi/run-only-second-inf.c: New file.
diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c
index ab86b0e5696..a72cb13be01 100644
--- a/gdb/testsuite/gdb.base/advance.c
+++ b/gdb/testsuite/gdb.base/advance.c
@@ -16,9 +16,10 @@ int bar (int y)
 int func2 ()
 {
   x = 6;
+  return x;
 }
 
-void func()
+void func(int c)
 {
   x = x + 5;
   func2 ();
@@ -27,6 +28,7 @@ void func()
 int func3 ()
 {
   x = 4;
+  return x;
 }
 
 void marker1 ()


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-21 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 15:57 [binutils-gdb] Fix compilation errors with clang in gdb.base/advance.c Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).