From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id B0E4D3858D1E for ; Mon, 24 Apr 2023 13:03:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0E4D3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CA7F71FD83 for ; Mon, 24 Apr 2023 13:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682341390; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2r9f7gxgGwSHUStA+LGdJPkFcBKF//W/aljspueLois=; b=MwhCL1XhyCRNkt5tGeu7X+6IiOvRAQlqxzaIh+i85EukZtQweQCtjw2Q5QVHtCXdNoK2Uh 7OUjFkcwyn3oPglYAY2QDXMTul/d3RbkzgBu0VZ+3E0Vt1qhmzenknzDSac99H0SNI2WvC JSDQgmRuTyLBhExi9LfY7Yf8wtXcQdU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682341390; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2r9f7gxgGwSHUStA+LGdJPkFcBKF//W/aljspueLois=; b=WDBYapO6W14WFbMbdB4xX/yi72oNaIfw54PtY1funFr5IC7XuOsMioCqBQ6cqzs1/o6QI5 5gN6oqVHi7Lj81Aw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B2B6D13780 for ; Mon, 24 Apr 2023 13:03:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id riVvKg5+RmRNDQAAMHmgww (envelope-from ) for ; Mon, 24 Apr 2023 13:03:10 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Use -std=gnu99 for gdb.server/attach-flag.exp Date: Mon, 24 Apr 2023 15:03:11 +0200 Message-Id: <20230424130311.8623-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: When using a compiler defaulting to -std=gnu90, we run into: ... Running gdb.server/attach-flag.exp ... gdb compile failed, attach-flag.c: In function 'main': attach-flag.c:22:3: error: 'for' loop initial declarations are only allowed \ in C99 or C11 mode for (int i = 0; i < NTHREADS; i++) ^~~ attach-flag.c:22:3: note: use option -std=c99, -std=gnu99, -std=c11 or \ -std=gnu11 to compile your code ... Fix this by using -std=gnu99. Tested on x86_64-linux. --- gdb/testsuite/gdb.server/attach-flag.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp index ad67303a7dd..f275b9fc178 100644 --- a/gdb/testsuite/gdb.server/attach-flag.exp +++ b/gdb/testsuite/gdb.server/attach-flag.exp @@ -37,7 +37,7 @@ proc run_one_test { non-stop target-non-stop } { } if { [prepare_for_testing "failed to prepare" $::testfile $::srcfile \ - {debug pthreads}] } { + {debug pthreads additional_flags=-std=gnu99}] } { return -1 } } base-commit: f20f27e0553b6751c4fa39ce2acb7e0da370ef23 -- 2.35.3