From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kc+gE/4QYmr2WSkAWB0awg (envelope-from ) for ; Thu, 23 Jul 2026 09:02:54 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=self+Mol; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4C3231E09E; Thu, 23 Jul 2026 09:02:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BEFB71E099 for ; Thu, 23 Jul 2026 09:02:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CE5E4BA7998 for ; Thu, 23 Jul 2026 13:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CE5E4BA7998 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=self+Mol Received: from gorilla.apple.relay.mailchannels.net (gorilla.apple.relay.mailchannels.net [23.83.208.75]) by sourceware.org (Postfix) with ESMTPS id 05FEB4BA7999 for ; Thu, 23 Jul 2026 13:02:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05FEB4BA7999 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 05FEB4BA7999 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.208.75 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811749; cv=none; b=kb+oVycYipVzg9pOlW9Z54rObjLLQlNedWyER90E116OSn/jV2yIsXbFV0Wq4bDvIh/3Iveu139X6pmb0khx0czYOyQcZTj2YsjhQ2qlDKreaKoPPJb2ZZttkQCZTzTmYknUrvrvEyB7yzQIOBrwz72qxKWARGmF0r4mAJCyMCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811749; c=relaxed/simple; bh=Lus1l2K5dtqUugzYtmLL6onnrHjQzyiSC/T+hJpECng=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KGCox8l7gY5xGIIbHRCoAZ0ZC8MygPNiPwClAEXFgJdoMOMO74pSt4Ltb5ik5h9SeFZg3jCLV+JhfQ1zDMFcmf2Rt1dmgMZMQKPg3ejErbInSz7OYH0IEUtwt7IqHcENTAkRZmLWIZ5vpEJAzQGPxpM9jgK2OljfIBG2bbwXrOY= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=self+Mol DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05FEB4BA7999 X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E7339403D7D for ; Thu, 23 Jul 2026 13:02:27 +0000 (UTC) Received: from pdx1-sub0-mail-a249.dreamhost.com (100-103-96-19.trex-nlb.outbound.svc.cluster.local [100.103.96.19]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 80A724019AF for ; Thu, 23 Jul 2026 13:02:27 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Good X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Wipe-Tart: 71fcc3753168a2b2_1784811747759_668812738 X-MC-Loop-Signature: 1784811747759:2842719338 X-MC-Ingress-Time: 1784811747758 Received: from pdx1-sub0-mail-a249.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.96.19 (trex/8.0.2); Thu, 23 Jul 2026 13:02:27 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a249.dreamhost.com (Postfix) with ESMTPSA id 4h5WVp5mG6z106Q for ; Thu, 23 Jul 2026 06:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784811747; bh=iC1vqPiCR1ILVrd8UMic/qwA4lD053mt9hojU5I/0Cc=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=self+MolUtBN9jHoTEVbdqoIOUBT3KV4RAKnSuvHKSrCJgNemJqB08zs80fuusb1o MgfLRlJW2lQeVecZpxJ25VB/NP8VB9H7sBFH0U9VKecANSDSbjAu3HT51/2cKdKuTw iTdpWYBsadfROVzxn3Gdm08yZkLaLTn6fGMudpq6PVIHOWwtXuNNRuLJNvQ+PPM17b XSZGllYSPW+IQdIB7R/WsC5MoyF7VLUrOJ5G7YUtr0UOP3vQAbRtQfmDyBpp0hZbtf a7SAcX+IhOSHUHIMXwEriSg3m7ic4eHstLnHFAxzzjvJyxhfbXP1DcxKQc930vKHdp 727G5U61qVZ1g== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 04/27] gdb/testsuite: Compile with -Wno-deprecated-declarations on windows-msvc Date: Thu, 23 Jul 2026 14:00:55 +0100 Message-ID: <20260723130118.206735-5-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723130118.206735-1-pedro@palves.net> References: <20260723130118.206735-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Several testcases hit compilation errors like: output is .../testsuite/gdb.base/callfuncs.c:231:3: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations] 231 | strcpy (buf, tstruct.a); | ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here 130 | __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1( | ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\corecrt.h:874:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1' 874 | __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1) | ^ C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\corecrt.h:1933:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX' 1933 | _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1); | ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE' 368 | #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \ | ^ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT' 358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text)) | ^ Fix this by always compiling C/C++ tests with -Wno-deprecated-declarations on windows-msvc targets. Change-Id: I9058f70c69a7b9e5ebf2f38b84c7e35df92ddc0d --- gdb/testsuite/lib/gdb.exp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b4046c402d4..fb9f29ee03d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6671,6 +6671,21 @@ proc gdb_compile {source dest type options} { || [test_compiler_info {icc-20-21-[7-9]}]} { lappend new_options "additional_flags=-diag-disable=10441" } + + if {[istarget "*-*-windows-msvc*"] + && ([test_compiler_info "clang-*"] + || [test_compiler_info "gcc-*"])} { + # Compiling with the MSVC headers results in: + # + # warning: 'strcpy' is deprecated: This function or variable may be unsafe. + # Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. + # See online help for details. [-Wdeprecated-declarations] + # + # We get the same warning for strcpy, getenv, fopen, + # wcscat, and others, throughout the testsuite. Easier to + # just disable globally. + lappend new_options "additional_flags=-Wno-deprecated-declarations" + } } # If the 'build-id' option is used, then ensure that we generate a -- 2.54.0