From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kwanyin.sergiodj.net (kwanyin.sergiodj.net [158.69.185.54]) by sourceware.org (Postfix) with ESMTPS id 38B32385DC00 for ; Sun, 3 May 2020 12:31:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 38B32385DC00 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix compilation error with clang in gdb/testsuite/gdb.base/jit-main.c From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Sun, 03 May 2020 08:31:30 -0400 X-Spam-Status: No, score=-15.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-testers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-testers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2020 12:31:33 -0000 *** TEST RESULTS FOR COMMIT e0c45f305525bbc3fd95024e4517a52d1c371868 *** commit e0c45f305525bbc3fd95024e4517a52d1c371868 Author: Gary Benson AuthorDate: Mon Apr 20 15:05:01 2020 +0100 Commit: Gary Benson CommitDate: Mon Apr 20 15:06:13 2020 +0100 Fix compilation error with clang in gdb/testsuite/gdb.base/jit-main.c Clang fails to compile the above file, with the following error: warning: while loop has empty body [-Wempty-body] This prevents the following testcases from executing: gdb.base/jit.exp gdb.base/jit-so.exp diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b24efc772b..0377114425 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-04-20 Gary Benson + + * gdb.base/jit-main.c: Fix compilation error with clang. + 2020-04-17 Kamil Rytarowski * gdb.base/attach-twice.c: Include "sys/types.h". diff --git a/gdb/testsuite/gdb.base/jit-main.c b/gdb/testsuite/gdb.base/jit-main.c index 40958ef5b5..37c2a31b3f 100644 --- a/gdb/testsuite/gdb.base/jit-main.c +++ b/gdb/testsuite/gdb.base/jit-main.c @@ -128,7 +128,7 @@ update_locations (const void *const addr, int idx) /* Used to spin waiting for GDB. */ volatile int wait_for_gdb = ATTACH; -#define WAIT_FOR_GDB while (wait_for_gdb) +#define WAIT_FOR_GDB do {} while (wait_for_gdb) /* The current process's PID. GDB retrieves this. */ int mypid;