From patchwork Sun Dec 22 00:04:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852883 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2767270wrq; Sat, 21 Dec 2024 16:05:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUfBLAzpb6eeZs5w2J2QM3/s4M2DlCV/8Wbe8HLhdlaF6xmDpeTYGVttSGQ0Ux/d3Qdpx8i8w==@linaro.org X-Google-Smtp-Source: AGHT+IF12G4Nrf+Dr/LwPZlwjvxqG9Fd4lPXEB2pl0K0mTDrwrRfbOtddtC5yzEAaERuGtq7EHv0 X-Received: by 2002:a05:6214:250e:b0:6d8:a84b:b508 with SMTP id 6a1803df08f44-6dd2333ae04mr124935076d6.12.1734825944896; Sat, 21 Dec 2024 16:05:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734825944; cv=pass; d=google.com; s=arc-20240605; b=h4Tr0TAL2mMI2rfBKp8AaEsF84UlsJS9TnI7J4BISbr+7i244lNIjYgNNr+o/RUw1H BDz2zQk8Gryom7vtIIAfPXEEvlwe34C6clNIHQ2Z2VDvJ3/Pb4Vzoc5fEgOWEV8GIw0B x3JzIOpK+ixExLy4ZPaW7wFTJ6gvqVlp1x+acmVAb28yR/TyzVc+dglkld78KuIOqDkT ejEAs6XBZHD8uKtQt1idvjR+SUFh9gn69mXqle0tsSdc4SKI0xq8b3CdyVSITGgTWpmQ O+VgZb1xkwRbckqufdqIciT5kykptFmQfIsMVvBwA/QmBHahNpN5tbH9IxjtKV/y5lSt iftw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=MWAZwz5kOz38b83iEzfAOUSnRi9+DecNfFKtExNqKuU=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=AabF7bWhYLkgwo60g321OVOjYiBD9vXaJ/RqI/O969q1wsQLI0i+Yqtw8n7Af8nEf2 4Xn/6eIDIQXumQ4UkjY0/Fa/xiwcjGUK+4197bUqMGwJV277KMWMaWKG9/Yrz1svNwAc h6IAW+zffAgcqP5jEf/o8U+U/qsYjnFXu4XGWK6p1BFDlYEtIVuu2y7gw/f5HrCVDMcl qKCod+HTTZB36+ARsA7jEJeu6nYeOO7GLF1NgLNMy26a9iolDHfQ7QssQdybp/HzCXWi bUEBoGVcNQKAjmlZKSAzudgrTjcQpTIVXmqvdGjLoWNTaAMlfDfOjFdMsY/coe+Gb/8U ndqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ipnm4pmr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1810c125si74682466d6.32.2024.12.21.16.05.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:44 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ipnm4pmr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 525D3385829B for ; Sun, 22 Dec 2024 00:05:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 525D3385829B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ipnm4pmr X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 337253858D3C for ; Sun, 22 Dec 2024 00:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 337253858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 337253858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825915; cv=none; b=twwWeb9gXUCS6k078E6GCNQgFGcKRL4Gsk9BHwjwAup9lINrXHFzhyZgsCvJvrWjimihYGf5VxIyi2rvyw8jD3rdOQm+lTuOwMrcGhfJTPBCeJFuDhSpPT0qkZl02BaEyku/fTcPh1GIU8QGVK2waYVI48o7WIs6tlzSgpXyQno= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825915; c=relaxed/simple; bh=ikZz5hJRCHjXUxmueFOXcJw6SVEjH/tnmBlIM7F70nA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LwHcpq8R9rd6HwdDIkd/+y+lbUyvlj8XS9eZUo5sJrxh2TDPSPyVKyTMs/z7dzTQdghFm38Knio+kYC7m1VnP3QJ7VdMhMPLQhfUhvDC1m1zxFDie1hPs2puCw4gtDXGbPwsXYFMc9gC0b89+HQ4V3YZQz2j4lECpTbS8AhkHXY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 337253858D3C Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-215770613dbso20994855ad.2 for ; Sat, 21 Dec 2024 16:05:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825914; x=1735430714; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MWAZwz5kOz38b83iEzfAOUSnRi9+DecNfFKtExNqKuU=; b=Ipnm4pmr7M8qylSifKLmIGxF1gg6ATIVWYqAlbS5qa3YichchOrVFtArnNnKJNYQLV Co/6tzBvIBqeimbYE1PPPPwaIeVYdz7B9oe+Q3d8fRYT5+hHkgQjCnODp5TI/8vUz4gk jSLEadTQsxQuWkM07hcc9UD6qWtfnVJzpKCy3AKumBl2oxp2D4IxaYpbRv967Spuzyso OVSB7N/fgSM2EEs9UggzrDhox0Mvz7gMysfPke91uW094CxRLn7dMkkOAt33cyQcNk27 BPhTpIk8zzZZA1oFin57Xy/4ztRweYb+d4+gSvC9E4F1z+NqNq3stmPJxCwAJ/7voGV7 qg9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825914; x=1735430714; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MWAZwz5kOz38b83iEzfAOUSnRi9+DecNfFKtExNqKuU=; b=Tkhk9lRV02Lwkpr886AeyrIYqkM2pPqH8urgOKfUQO0OxWGL4QpaPkXaO0F5v/tcbZ GeeBLhEtlHBpaWq6P83dopytFNrjArigZCrWivFTaaytXY06D3QB8prqIp8a2woqf+rg K/gzWSoS3bQp6Wp5863N3O1E+K4a8ildQ4Hvd1CHYNKB56hNPX6W+4Fq23uSteQQepVQ VPSw+KVAT81NFxUubocSlQTio/SMMLk+B+fWsAV9+zolTzkLMvd8ghOABOpEkp3F1YDm ///DTEI4EOiBbc8cEakrM0lLplbpgbH1f5Lt8tZFTrLybONJMGnEdbJIbiBLa0CeXgOb /5bQ== X-Gm-Message-State: AOJu0YyVgUOH5Zr3ame5VfcG1Ad9emh5spHnMzInN3dVbz0DUOfpSXtH KM8yNnIlb86LkugPOHfKNTn7Ay359OPnupVm6jeAkaNZSih2HytzQmxWSYouBBwPAQ== X-Gm-Gg: ASbGncvrQVJ6pX8pVja51esJbtmpn55/2mgKKs/RKvnIHz4a9OSkZEqDwOHeeYkL4Xj XETbkSIn4DTTvzliWnNTPjk/5dvd5QxnozHd7I+Dn04sXInd2JI/NS19QoCTgLFM7IVrVTKf4xM uY6zVQHMrR8cUoVV7VKb7dG+UZVFNKQQ9fX1i7HKHVT9irlqRT574HbG22famuVaa4dMBCcXuXc Ol2DJEbUub6YmPpPSXZY2AlRPF8nfGU48FJstWIWoYFZoOCkJ4sdV1aEoyJ4xcIduteCeg= X-Received: by 2002:a17:902:db06:b0:216:2bd7:1c49 with SMTP id d9443c01a7336-219e6ebacdamr107287035ad.29.1734825914012; Sat, 21 Dec 2024 16:05:14 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc96e76fsm49108035ad.65.2024.12.21.16.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:13 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id A15EFC05E3; Sun, 22 Dec 2024 08:05:11 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 01/39] conform: Use -dD instead of -dN on compiler invocation Date: Sun, 22 Dec 2024 08:04:24 +0800 Message-ID: <20241222000509.2205895-2-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang does not support -dN. Reviewed-by: Sam James --- conform/conformtest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conform/conformtest.py b/conform/conformtest.py index 8337afcdad..d38afb06a8 100644 --- a/conform/conformtest.py +++ b/conform/conformtest.py @@ -620,7 +620,7 @@ class HeaderTests(object): out_file = os.path.join(self.temp_dir, 'namespace-out') with open(c_file, 'w') as c_file_out: c_file_out.write('#include <%s>\n' % self.header) - cmd = ('%s %s -E %s -P -Wp,-dN > %s' + cmd = ('%s %s -E %s -P -Wp,-dD > %s' % (self.cc, self.cflags_namespace, c_file, out_file)) subprocess.check_call(cmd, shell=True) bad_tokens = set() @@ -639,11 +639,11 @@ class HeaderTests(object): # macros defined by user code including the # header.) continue - match = re.match(r'#define (.*)', line) + match = re.match(r'#define (.*?[^\(\s]+)', line) if match: self.check_token(bad_tokens, match.group(1)) continue - match = re.match(r'#undef (.*)', line) + match = re.match(r'#undef (.*?[^\(\s]+)', line) if match: bad_tokens.discard(match.group(1)) continue From patchwork Sun Dec 22 00:04:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852900 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2775281wrq; Sat, 21 Dec 2024 16:38:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxUOmbSzaZNufdytmqKfofaF2fKr/ncCfpGMgPdOlN5vvsLkq59WJCRKpXoN7YXQnDiBJKIg==@linaro.org X-Google-Smtp-Source: AGHT+IEOqBqxbqb1pwzgV7HGEMclUcdb4+R5gorS/g8us142Ma5f5UYWX8SncTFOTiQOxK/OIT98 X-Received: by 2002:ac8:59d3:0:b0:467:6f59:e343 with SMTP id d75a77b69052e-46a4a8cc56dmr118506361cf.21.1734827887463; Sat, 21 Dec 2024 16:38:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827887; cv=pass; d=google.com; s=arc-20240605; b=eaB/LTVcazkg24ZGxRz+JPRBhIlD84E/sqYepxya/Kg9KOaTEXqS7atAY9v55tat7G PhjH52/dPmwZ2poQrsu4p1scltcpZ7ZkvQBR+O5pB4VtIw4O4/tqEkgl0TQS79/qBgnS C/YZAHRK4dT5h7Y1ZOo4zbcJp55cLwQGpYKlFTdUclcTEn90LccsmmITGlG+SaPe9Gm2 iJlXnr3fAnpiM8IQt0DbOzvJIFJyZUNfE53LWaISNxTWbV9Tn1TXyjQunkHA/nFC8c1N M5Rx/3aBkQBzccmIj2nKYsvwIptGyDJjvtFeWa7H8ypAGyfpYSdZGXRRdcVzmyM+yDIQ 5W1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=XaCvP1i0ZSmigFbGBuLfiEuC4tsM2SQJq90Jr1Z8Ydc=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=HkJ8kUQB8jb3duqZOcPmYw2eJhLUWZWasBDa8oQH+DgSWerIuYNGdtRbCzZhaT5gzR nmMgHRXo1kbVslHCanRujkR5i0msnVBJw//s2GoISOPLhx8gF6fac4y+Xq5eJWj/nwti cb7+eg5Pz1Hos+N+adPeVdUXD958sBiTCi4lhx/gXfPU+4Vx+EU2PW3JYT+vExbCK++f tkBkpS/8uk1nQh2cEv/lg1dbc+3ppdTcKlEulfq9qFLOzRNyasxjFSJqm9Rz0pAltWUS Wb+jaaBYtMV5efBGpG5CLmuKmuIHw22LnCVLaNmlR2qiERAKtN/CJV83BB+SHdXYqxLc Q91g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L48Jzo4v; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-46a3eb99f9esi84404591cf.355.2024.12.21.16.38.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:38:07 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L48Jzo4v; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0ED54385840F for ; Sun, 22 Dec 2024 00:38:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0ED54385840F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=L48Jzo4v X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 8C03A385842A for ; Sun, 22 Dec 2024 00:05:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C03A385842A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8C03A385842A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; cv=none; b=xRLboFEjKedVpki/rK9oXuZwL1XHv7QidIH1E9qB7EKLezO/fzY1PMRrJezJtD5BS3fY7DKAUjTo3n/KpZjl4NW1C8C3NmrKLVomyS807yZVmUfMTFDj6Much4/+rJWWy7ngwi/1RZX/L1WYrjnjQb6MqrOXXSUedtnqD4VUSDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; c=relaxed/simple; bh=60aO+vqvszoqyZ99DK0Lwu7IyjMW1DU970S/HNr/dJ4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qaRArXQIgngHmc2GrhIwXISPZAevuz1Kpb98imDOBka7RBcINSl78G9q0ZL0jGRH6KSy2tI+lFa/UczcJGx5FXJZpboUniAxaMv2p9u023HFfHNsp9aHGopMsy8u7AprUk4OY/CT2Qk3P1izU4zeqrKPb449Y/XtRVO9RQ+Eyl8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C03A385842A Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2166651f752so31996825ad.3 for ; Sat, 21 Dec 2024 16:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825922; x=1735430722; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XaCvP1i0ZSmigFbGBuLfiEuC4tsM2SQJq90Jr1Z8Ydc=; b=L48Jzo4v3VussiUSS2SD3JIsN+qYXe/2d/zWJ7NUp3KLTtSqIJ+20uVvMPk/QVj9UQ 1M7vX0kZQz0dTVjutP9wT0lGDRKPu8V+hKnt/So0Am6So6fq8+AXljrKFBEs5ltaYNyh 8Kx2RO2XMGYOdiA5SG5l/3uugViLoYw3rEOQPZZdS/bZgznBvMo0+WggPTp6pyBdEvAX qQuj1fE4UD9J3GcFV/hkpS70yVLSOrkmwBIM1f83PAFLXUumi31pUQB5pI7LvI8DFBx+ w5uJh8i0CM5Q32/UZ8gWOv0HRtPny/sCkekO4ajke3Nc2sfzAFgA1o7NWx5PlpNIVKfQ hkJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825922; x=1735430722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XaCvP1i0ZSmigFbGBuLfiEuC4tsM2SQJq90Jr1Z8Ydc=; b=dhRwtJypRdb5OtcJNBCAF52WS5IT5LwwODhYRrq0Cw3L0JBHXjZgRIlXiGQb1dC3JO 3gM0t8ByOWTeJy8kb+62xR/Af26WJp+bXYd2bEE+4hxjUBQeMeXhIwGyaA9rFAQmZ1T7 c5Lbh2trE6MOCWKHY1I3GSCB45lnRstfUh3AoL5yQ/VzpJ/Mu7mM1DgxS8ubWl/n4ZcA u/wkc69nMrWVLo1/nx4QL9pV7wEZr/Zfj25VJjqVaPHpZr9hV/8EUj3WLv0J+phl5OwV ha920oIEgvihNL34WrS6oC1PVtwKBlOfiZIS8046wI1VImnQt4hlqnusfWvDKF6xupBt TeLg== X-Gm-Message-State: AOJu0Yx7tKTTnMbbQuVtj+lDtvqb1fnqGtFkJ2q4OUAuJ6hXFBD/KTyT cM/SADycV1gO3hW0vbeGjV5CGZ7MRIpVi/67/Ukn/Hsop2L+SgYCDflJHuc6FTImlQ== X-Gm-Gg: ASbGncsPI/zzxRSjpGECkgQCkyy/xKdxkbPP66RstRykLvvvUzXXNp+ivh0odbmTIkf S+wxYSlX8IjKhTxSeaOuBjENCS5ErZKI+JlQ6jxJMRz7gJuflk6gOiN5Zb0Nw5osdsn/jmYdIXX bIww4PkLrmabUEAxhAwN7SLYWqH2i4VVYKlg++qacWYZdYTNgP+rT2WVPMJusa5tCpN8FV0a+zT iSpb8RZVFhweOzTG/Io72XhCAxUB93zFdi2k1t2ZPPymSTonnd0R64tb5c2tXW4P4jMJI0= X-Received: by 2002:a17:903:2b10:b0:216:3e87:c9fc with SMTP id d9443c01a7336-219e6e89b91mr127127455ad.5.1734825921912; Sat, 21 Dec 2024 16:05:21 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f51c2sm48896805ad.190.2024.12.21.16.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:20 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id C1A48C06E7; Sun, 22 Dec 2024 08:05:14 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 14/39] dirent: Remove variable lenght array structure for tst-getdents64.c Date: Sun, 22 Dec 2024 08:04:37 +0800 Message-ID: <20241222000509.2205895-15-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Clang emits the following warnings: ../sysdeps/unix/sysv/linux/tst-getdents64.c:111:18: error: fields must have a constant size: 'variable length array in structure' extension will never be supported char buffer[buffer_size]; ^ Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- sysdeps/unix/sysv/linux/tst-getdents64.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/sysdeps/unix/sysv/linux/tst-getdents64.c b/sysdeps/unix/sysv/linux/tst-getdents64.c index ba66d49a2e..feba24d7b4 100644 --- a/sysdeps/unix/sysv/linux/tst-getdents64.c +++ b/sysdeps/unix/sysv/linux/tst-getdents64.c @@ -103,6 +103,8 @@ do_test_by_size (size_t buffer_size) int fd = xopen (".", O_RDONLY | O_DIRECTORY, 0); TEST_VERIFY (fd >= 0); + char *data = xposix_memalign (_Alignof (struct dirent64), buffer_size); + /* Perform two passes, with a rewind operating between passes. */ for (int pass = 0; pass < 2; ++pass) { @@ -111,23 +113,15 @@ do_test_by_size (size_t buffer_size) while (true) { - /* Simple way to make sure that the memcpy below does not read - non-existing data. */ - struct - { - char buffer[buffer_size]; - struct dirent64 pad; - } data; - - ssize_t ret = getdents64 (fd, &data.buffer, sizeof (data.buffer)); + ssize_t ret = getdents64 (fd, data, buffer_size); if (ret < 0) FAIL_EXIT1 ("getdents64: %m"); if (ret == 0) break; ++read_count; - char *current = data.buffer; - char *end = data.buffer + ret; + char *current = data; + char *end = data + ret; while (current != end) { struct dirent64 entry; @@ -170,6 +164,8 @@ do_test_by_size (size_t buffer_size) rewinddir (reference); } + free (data); + xclose (fd); closedir (reference); } From patchwork Sun Dec 22 00:04:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852889 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2770009wrq; Sat, 21 Dec 2024 16:16:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXquX0+caMw6FzLz/mpPPurZ66ItSVL2uDxRMVW2eyMm2qzYA5GDnbVVSpeow3nw8mjeQTjqA==@linaro.org X-Google-Smtp-Source: AGHT+IEpR4sKbxBhlmeDgyJZnoTa2CDkPFu+fOFUOkUNtMvi0iJNBZlA8vYwE24RiK5J/YOH9pdd X-Received: by 2002:a05:622a:1a8d:b0:461:3834:b632 with SMTP id d75a77b69052e-46a4a8b2ae3mr139032941cf.1.1734826563978; Sat, 21 Dec 2024 16:16:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826563; cv=pass; d=google.com; s=arc-20240605; b=btKJjO460WN88pEKUaVuQLG0bnT+mkBj/4jPRwDV4OMbN0qfKFhc3eGIN3L4SDFEXE vRARvSFPJuyeudNbQLMPTOL+sAd2SM4rTOY3m4WLplOQExZwmR52f5I+3i8SR7/HaKzm AZ3/AgdVy5B55/DblWDpzO9V+xSQFqFWpYkOMQBc6k8zbtS1gcwydMhI+TiNJ2O4um/K fcaLvnacK5oCINQLtZesu1jQ9UHGtM9pMWW4ha5IdagiRKozl6p96DaIK28f2+2/J9E/ 7bFeE0wFzuJ7XFvvBKzxyCkYoUWHCi9rrn+d0cENTd9OsqCyEtngIVyG1L5Tx6wQRgIf bomg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=Da8LpNkaTpTGRmBuywySRV2ZGUaMrAKm+yM2Ivybe2GVQVbu9i7st+FHqXM9xxEifQ OSnGGlVBmXzbjbyvh5v9Q+3syqzk/IVYjwOuWLU2Jc0LrQWDHol7sERAuxnuG83huzIX VgphUO9w0pE4T+tcYsMAG8gYBRjcfE1wiQfs1/qRJoyyB2l6+sHyMiJooC6eCGiT8LCL +lI3SUdwtJ0r8PfmBk2pWmKRCJUF5sAAdj53G+OoYrEolK+YBK698OsZUnWJmHNj7EI9 WKTVmOj+eHwHcVNn0TGoyfrxsYVW7+EB6LkUj9ThgZp11kFDvV8zUZwn66EmxQyKADVt WvwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="I/J7nABR"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4ce864si852300585a.431.2024.12.21.16.16.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:16:03 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="I/J7nABR"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7B21C3858420 for ; Sun, 22 Dec 2024 00:15:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B21C3858420 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=I/J7nABR X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 8F3A9385842C for ; Sun, 22 Dec 2024 00:05:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F3A9385842C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F3A9385842C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; cv=none; b=ckPa/PDVf77vrBumwBg5CjaCDR4w9wtqQKseRFaTmOoQKzjXsZ5dQTcuSuW1Yu8flz7Ffrkes+Mg3zG05rwRhCxF0bOQnVJBQQBtssyIWvcvXwxANz+0HYRTt5jZ/OT/pylIZNbS1jyVr/Qo1qNWnEdxsA4bVmRnit1+ptI1ESc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; c=relaxed/simple; bh=ZGeQzaHRrStfFuraCgMLJb2xtsp7ku2iStYGmiaN7pM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EcX5xldY7vhzDKvQSwHK8i4axIWX/sydAJ4llctO5pei7ApeUOMKza1QtbxJWK+e3IyaedQMi881GL9ZfvK5h4q5HH9NnMWVHEMh6c/+DcYmVEv/9UwJ+926afdFg69NHBdsiX06NS/C3s7Hh92AMqCJBuF0MBRJnZP+b7qAMKg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F3A9385842C Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2166360285dso29243225ad.1 for ; Sat, 21 Dec 2024 16:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825922; x=1735430722; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; b=I/J7nABR1EOVgPgW/rP1sqO5uIjQHfy1tC8WK3vB5mmcx3d7ODwNQsQK7YdFe99uC2 2TEgDtXtWVjAC8dyfyTh2wBEtbNZ7F12MYeICI/rJ1QZOYhJv9Os4zUcTz9AXH2Bh+7g CUD9HyZGI34xvwea+09vvnuMUgB1VyPHeOik8FW51LndEL5FNBwmYEdZjo8y7XKoZsqA wnPIeJ1OfBJ6OHnGA/7dEMdxPpKNmNfpmWFmCDVMGCBzhZxbk4N5YWyAS+xgCIoMZRFG AWsGaPnFQ9z9jpRkkZgX0bywkTkZz7ys+QduGbapYIjVUvWLkxljhiaP1JvF45V0iwIo Px0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825922; x=1735430722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; b=FsxLTPPVGne8rTIpE0qSBBV20bG9A78em2+K1K+BG7nifKzGw7CiWJSBwjIgAXVlhq EWnl7/bMxogvIie7+9+hu2OOjD1Yeq8k0TzNBRqrfuUXQswcjvARMssqlGsiXYsIvHSp CehgLOxkf77gGQCuTRSgbq6IQonSHW1Nqqkjbbx4MEPizxIPypanMIZPJ0VbGtk2uNwW WVhqJAAwZBwOiqRT3Ior+ipxeGxPT7wKHGurCwT0TMmm46zSkZNlRKXTaIedBcTzfkdD rjohcLd+bZT8/4P8tsP1/ZSnipcjc20APT/K2cnV7eQJ7A1W79FaIwGjI9jYAgtirBeH KVXw== X-Gm-Message-State: AOJu0YxN0n/y0VEBXaEY1NUTw39ZzS8cs5ik06Z6G2gIz/WN3YKfwTtB YUMuQA3t2VVaYe4P/aKmsqMPoCzbb1K/Wdmk/CqhXGeedObQXPCk X-Gm-Gg: ASbGncucQbcGIIMnEmQLWRMNg9lbias++XCl28wmZUM0e25sGm8KmEYU8swmb9NPBpR a2/NCMdunJKsXbAfWtbzR1cHdINEZGQOiVvYHhpGb+XAjYuYn5tgN9N78tQr3qut5kkHcNu/bhc efYYopGW/p4UiJNafISdclZ6HT4XZyY8zpmT56wyLlFO+BdhZw8SXTl+1CjT7iN8HUUtIzElNg+ Yr6hp7wPogIzjdo4KXEqgOeR+NC1V/JJiK60TBLrFZ3nFzOGCaE7QCMB8efgsr8RxJHPpU= X-Received: by 2002:a17:902:f68b:b0:215:b18d:ef with SMTP id d9443c01a7336-219e6eb362amr92980395ad.25.1734825921673; Sat, 21 Dec 2024 16:05:21 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f363dd7013sm7967844a91.47.2024.12.21.16.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:20 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id CC946C071F; Sun, 22 Dec 2024 08:05:14 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 15/39] Handle pragma GCC optimize for clang Date: Sun, 22 Dec 2024 08:04:38 +0800 Message-ID: <20241222000509.2205895-16-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Reviewed-by: Sam James --- libio/tst-bz24051.c | 6 +++++- libio/tst-bz24153.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libio/tst-bz24051.c b/libio/tst-bz24051.c index a9903f20a3..2d32aae74a 100644 --- a/libio/tst-bz24051.c +++ b/libio/tst-bz24051.c @@ -19,7 +19,11 @@ /* Prevent putchar -> _IO_putc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include diff --git a/libio/tst-bz24153.c b/libio/tst-bz24153.c index 023f07ca20..c379876fcc 100644 --- a/libio/tst-bz24153.c +++ b/libio/tst-bz24153.c @@ -18,7 +18,11 @@ /* Prevent getchar -> getc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize ("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include From patchwork Sun Dec 22 00:04:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852901 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2775631wrq; Sat, 21 Dec 2024 16:39:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW6T6o6yicwfl+4aV0Uih89YEcVNlL5PcV4+sdzAXIp5J4nM+KtBHXVbhYveMQm/1uKiF9eGw==@linaro.org X-Google-Smtp-Source: AGHT+IEeSPDo9Fi1WOSz83jotvGMV3dFxDi/Tc0XWEAVcORH7C8fy6Y876eSIWEjO4jn2kmHUSSd X-Received: by 2002:a05:620a:1a8b:b0:7b6:dac1:cb81 with SMTP id af79cd13be357-7b9ba6ef9b2mr1465570985a.1.1734827980839; Sat, 21 Dec 2024 16:39:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827980; cv=pass; d=google.com; s=arc-20240605; b=MJjSmiUvlUnLTqY5WDyvaXDbIXJYROmke3+O+5XWNMxNDJdUQFOjAnaqWAzEVYqznJ gR/1/8OLTEZRnMOGHd01O83XxKoIrjX7vVt3NySUFRHGEcL+0oB7w5laz5xJnqEJEBWQ RYOfj9rg/n2Ai+biIKvm6HFV/+llxS4qqUbeAyhPZnX3DOIPDSUH38jkVKTGtm+TvZSr 3HA0lW+Iz5kpEnvXtcyvkomilguROjAxbfzw7+z0lm+injc85/qsnmb4IE0PEPcYV5vM Q1iC+8HOHya/DkDXmaOSlTymygRkYnnxZZ6P60cMTKJvblRupV6VVN00DheHjgk8xgcZ UEkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=Nnyy37DidKBZpeLUQfLq5zNp+2I6AnnPaa8y5rDe8t4=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=Rkljv7zzeq/e04x+u9c411BhVTACCw/bQZvPgbZwGZVHBPFwg9oa/NeEeh46LJ+bmW QfnZ2WcNssXabkQX1VWXrXOUxUv/z/Tl/I5J3jvO4xYwIAcl00bqvzUlJbMpGG8eizk6 t71E5aAhrw14NlUUBstPKpLYI7xpmP0TMMoGqK4mvUzGvTj4ZIy8LgOBnM00911hxi3y oJ3Dryarqzt/oJlVOY11tt23KZTY4ottfcfFIRCMsHzSAjSJXHePIUqHVLzFvDRTKAtJ E9qU7UDS2CgIeNpiNyrK9zoPwzJUYXlP5xl50oG/qTDqBqcv7IhWYVNBeNe0LEAs6mca 6PfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KHftbdA2; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4f106asi841471085a.493.2024.12.21.16.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:39:40 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KHftbdA2; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 414813858408 for ; Sun, 22 Dec 2024 00:39:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 414813858408 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=KHftbdA2 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 8DCD13857C5F for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DCD13857C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DCD13857C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=BgoQ8GmmL12gZGgb+beu6D3WhReS4fJ1lL2sAhqIfe3NTpEfhUSM1iYVaZAkWdJO8U+P8FwSsditqhnZoC86WIHwlVTZM6NO8A7mNwzykRwrggiEL/iWGdM3OVo6gXEIVQLGBGDOvKe2hVheTFiRlm8i/n/Ja3jQ65U+W8IL7aU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=v0xnv8zDwhqlL8/03qQ7DdNPdC+/GjUkNhhy8EuN92g=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uphERj0TYGyYQN3tT/f63zjxkqVgIGc4NjzA2JaUF2pTzJ2Qsgb7D3p+hc/uQqvuX8OvPUtOix1QjD5+bwD6pWSA3lh+P2Iv1Udwib/Lbink/pHqaou9lySEzhKbMn3hwwonzieuYuPqVH2+kVta0w58BGV7XjdTbro+KFpFBzo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DCD13857C5F Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-216401de828so27153645ad.3 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825923; x=1735430723; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Nnyy37DidKBZpeLUQfLq5zNp+2I6AnnPaa8y5rDe8t4=; b=KHftbdA2/nkGlribcnUovbMKvOvEUflF9KI3Veaes1Cv2O25RW2N03H0Wewk1PKQvg NnYdCfFeEU5tTj2HzEvLzdbP36UvQeKH/mtsRBNwMTGDBwRJ6f4IRWwG2lHA9bZoiRp9 Y21f4YDXFKySbWcSg6/JoE20mfHBAu/WBnvULrk+xWyi171E1GqTO+ax5u/N/qOWiDQ5 jb7fbkLPkMWFt8xtCIASvORZdXMEg030JJolTdF1ElBPFglXUPuMB1YihO/t51WRJ4K2 XSrYSOs1HxA1TqB76/Cj3DZGky/wYmTA0r5PzPjeMIIEWBvGKta94VvY6LGKhCawTxBi t6tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825923; x=1735430723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nnyy37DidKBZpeLUQfLq5zNp+2I6AnnPaa8y5rDe8t4=; b=oGoCHyYMopbBKo+UYCB0oYNOo0xY7F0qR4MU2y+acDipNHqYgjxFAw3JG5ybBdw2ju Wphiluus652coqry3NbFI/qBTIqjH8E+0CcPEaznyAik+tUnn3bc58AKYzzW6/EzthHT xISqGg7OY47zUhFltcX7bJckCdybMtmSLvNlK4caoJaSnb8EFX2lc8VtbSUMC1XOOEqi RclIt3PozXESb+I0XFY0W3MqSQ4/RnEa8Xygq63U+yPrAsuDpznRXrxyw8/Q1sRSBOlF mG9ncvGh46vVXB3PFROF/oMncEqBaR1eJKCo+JSsLHeVgyRmMqhJiC+r6isr4hrl+gRU qpbw== X-Gm-Message-State: AOJu0YwrpZUHesGsc0WjzuoulZ3jrfSmvAIxtuETabT5E5hzwj+BjQPJ qjs5RD48cpBaORm84fbw+horHGBs6Abg4euRAdcmgy0jbPdydkqlNKneEgmi6rY6dw== X-Gm-Gg: ASbGnctT496jCdhd9hQ87BEspXIXFhR2mtFCnmg4OPNz952Hd6qVJu2a5nn4vBj5LNf UDhqGPMH7aYkomRGgjMjGmblRsFWEyhmUg/rCLkbJV4CMp42CrHLwPL+PFQV532Or3XXU8DE1CK pVUhPsgIgXvBcFuicIzLsFX+arrwe97z2A8sf0L9WAPNy0+C+WkZskp/ikhJolgzuF6pDCSMiCL FgvffmCUsWr0de3VwvrhK2/wvhCNe/X6w25ecO/90HGeSOd+0bXPYaSg36jyISIIDAHVJ4= X-Received: by 2002:a17:902:f607:b0:212:5786:7bbe with SMTP id d9443c01a7336-219e6ea1baamr120847085ad.24.1734825922933; Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9cde50sm48831895ad.154.2024.12.21.16.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id D7741C0757; Sun, 22 Dec 2024 08:05:14 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 16/39] tst-printf-bz18872.sh: stdio: Use __attribute__ ((optnone)) for Clang Date: Sun, 22 Dec 2024 08:04:39 +0800 Message-ID: <20241222000509.2205895-17-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Use __attribute__ ((optnone)) instead of __attribute__ ((optimize ("-O0"))) to disable optimization for Clang. Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- stdio-common/tst-printf-bz18872.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh index 3b283f49a6..ade4b61f85 100644 --- a/stdio-common/tst-printf-bz18872.sh +++ b/stdio-common/tst-printf-bz18872.sh @@ -31,7 +31,11 @@ cat <<'EOF' Compile do_test without optimization: GCC 4.9/5.0/6.0 takes a long time to build this source. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396 */ +#ifdef __clang__ +__attribute__ ((optnone)) +#else __attribute__ ((optimize ("-O0"))) +#endif int do_test (void) { mtrace (); From patchwork Sun Dec 22 00:04:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852885 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2769072wrq; Sat, 21 Dec 2024 16:12:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUnYIpwz0MQSybkutatF5A6YO/oa/3M6MonDt6YhcF5HWkZNnaro1BAcc72/0oM0ewc/pxGNA==@linaro.org X-Google-Smtp-Source: AGHT+IE4GXmwDuqTaT8/wKbutzFi6mZtAFBkvI2w+LkFCrvV5FH80HxfSpYiHN7zkhOY8IHN/qD+ X-Received: by 2002:a05:6214:5290:b0:6d8:7e03:c427 with SMTP id 6a1803df08f44-6dd23346a54mr115554076d6.20.1734826356501; Sat, 21 Dec 2024 16:12:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826356; cv=pass; d=google.com; s=arc-20240605; b=AFr1TjjI+iSgOsWgNP++VvRO7eAUZToyyvQpidruf+n5s5aeLV+Dhc1uhQGln+4YRW XmTA8zZARmg8TSnQDr9htzD3MLzmCvXeu5V83ABL7S9wEYjvR+tLHqvqAAFFHMJCacey ZY9/rKIBJEKVoxsMZVTaZyejYjizJgEzN9MqbTDozn5wVrspzckKsxST4lOVBIkc8X1l WNUgzIv4IIxMSxCxKIR+3R+hUMo3rIo4vLSM1CA3Kx4dpy7tvNkxmGHHgmWhI743w9TP SuoBpGv2jaYUBZjD02+czGtVPYSnZXytxFjGI12M1/pIY2YjnFSroeFxhHCO/BLWgqFU TVPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to; bh=YypKVYxR33xhOJkkK2Xt5McNfyvI35NBxMLqxAFPywg=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=SPbSQPVpyYk5J79cZloR4h5Ax9bRVbOFoVj5UMWPZPbR0LVmYeUeyz9ZFneiwcZQSm X4dLCzjF2tkxYJjCI5qv+k2o0R1Wwav01UE/YpxnHBLDHCq16yjIJ6OkFRJZhdv3GOi2 a00qXD9oEc7NVZ/3rhQhD86V8P2PE/AwncnbJ8CQinw+lBBXpnMlN85RlYOD/xmu3v+U iiirvMGjlOXGwJlEQrhIaF1KgUkzHuaY2yJzJoXau2x8d/G+bAxtvQqwC5trCK/QZRMu toxR84M43Ttxu+zQDuwv6UgbUtjjQGnDfSENt/d0/lXwPDhCwzNAHDDnmapslHBe6jih qS+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RFj7gJ7n; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd182363aesi82834856d6.242.2024.12.21.16.12.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:12:36 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RFj7gJ7n; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E902B3858428 for ; Sun, 22 Dec 2024 00:12:35 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 8DC883857C5D for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DC883857C5D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DC883857C5D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=ANIgjr2icWeDoNRQUL1xnALnBPNLGWOT0jyVy4tXfaVGrPwbSpLFd60MPSOfr+bzRLCQXzNMm7LLeLlM+hnnb2nD/M46/HnZaiViCEMC3+umHcxpfV7MyBMMa05QPip/znz5gWk0k8zy1CWZ7nPLIo0uyhxeztXH9Mi6DO7w+hQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=kV85X6av+NUQvMW3fBpb0c6pXlm0uoHkx/ANp6kJMsA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CEh1CwI2feW4m+cdGjitO1JXARoIdudSHERKZ9W3eBEPh7eu787M3svdIqOEXtj8OlCVD8a+ZSOerEhO2H2IVCw+RjDjORZo5j80kDjmm4PwcA9N85Uh/qXHgZZaI7pKH+QDIyiQYpMEE+Ccm3bvMlQ+QVBlJSfNY3PHlGy5PqU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DC883857C5D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=RFj7gJ7n Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2164b662090so25804945ad.1 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YypKVYxR33xhOJkkK2Xt5McNfyvI35NBxMLqxAFPywg=; b=RFj7gJ7neUA/Rnli6SXliAWBaXvZ/KHMa+4B5dmFUbzBfl+b9qdk1+ky5U1+rMGo2I MhMaf3IS3fYH/0jhD906a3CBQ574/FNFKAH7W0fY6OFGcWMrESN26aNLAYpOyFF3wsWM XAPcGgUe9SEQuVi0pSuaWu25Uean1QT5o8AjoogNZrEaB7ChCx+ku/5yvwVBY4hIbY4+ 3JScoWlnn7Qy8UoDIjaX4FLXmisiWxbhC0HHi5X019Q0avCCQV+XzpfxNzhOCYEnrI5M 0Bsi1MgsFP/JXnj1Z8dtQMOCFZM/vaMnI9GnwM6lET4BnpDa4lN0M300qNSFzorI1/d9 y9/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YypKVYxR33xhOJkkK2Xt5McNfyvI35NBxMLqxAFPywg=; b=P0RWg6U+8QVon4xlIoqBSthT6QyARcONPIEzMqjRRkLusOEmiNH0RNqPI7YgC6xBVQ ijiHbKgx4ERuosfr9WoHZcsLjx0qbc1vlDuF3ZSf5kqJvvw9wj3oYvJZm/e7tnFWGQR3 OHO6dVmKIrO8oW4HJEyEYbbaY9ZTIbrQMlOJnyUHzo/iBJMzJu9TvNo2gxchJhOBRo5j IMdEI9X34NNHnJefYmjfkf6jhgwE1xiNvtgy/GHZjUNWdWlrJ/UCFezJ18IFgbMzbLNX hzma7AkESfhnpv78Qx97rM8fPXSYCYIoSmtW+j29LM3DXRnmWfRFPdALPbFqok4xmr21 S4GA== X-Gm-Message-State: AOJu0Yy+OzAtPdwyuZnSQ0DO9Agu20ppvUKzpMTYD9Tzch4sgN4Z/XlE RLjm9ZFjOhEa4hjIlFRLDDC53CVlCBX0+ddp8MF9mjoQ6OUlW/0Bm5d7TsS5OgA1wg== X-Gm-Gg: ASbGncvvRteq3Gg1CpE9S0pgdh9H68k9K6QwsYxbJgDtUjJp34vkhznCwmQSXDu97lw Z9aZAAWPQDIgULoW66nBaxgu13qmwJtakflH9EoulEEUhO2xR61arIcDpM2hj39w5N1XCKxINc9 uOc+DcHo97KY0lu4eUUDt8KMamZrucEBudOYZ14phwigorZKFArURQL0kPfQDaOKE/QzgvkGfpV QGyXpCG2F4OAGnonDk2BDLN9oGy4LsCuiS+kmgW6EJHRU3ouc5NMwsNEDLXabzMwexCa/A= X-Received: by 2002:a17:903:2341:b0:215:9ea1:e95e with SMTP id d9443c01a7336-219e6ea1c17mr124000465ad.13.1734825923684; Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9cde66sm49082855ad.145.2024.12.21.16.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id E26B3C07AD; Sun, 22 Dec 2024 08:05:14 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 17/39] And defines to __attribute__ (__noclone__) iff compiler supports it. Date: Sun, 22 Dec 2024 08:04:40 +0800 Message-ID: <20241222000509.2205895-18-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Signed-off-by: H.J. Lu Reviewed-by: Sam James --- benchtests/bench-hash-funcs-kernel.h | 4 ++-- benchtests/bench-hash-funcs.c | 2 +- benchtests/bench-strchr.c | 4 ++-- debug/tst-backtrace.h | 2 +- debug/tst-ssp-1.c | 2 +- elf/tst-p_alignmod-base.c | 2 +- gmon/tst-gmon.c | 8 +++++--- gmon/tst-mcount-overflow.c | 10 ++++++---- malloc/tst-malloc-thread-exit.c | 2 +- malloc/tst-malloc-thread-fail.c | 2 +- malloc/tst-mallocstate.c | 2 +- misc/sys/cdefs.h | 7 +++++++ misc/tst-syscalls.c | 14 ++++++------- nptl/tst-minstack-throw.cc | 8 ++++---- nptl/tst-thread-exit-clobber.cc | 12 +++++------ nptl/tst-thread_local1.cc | 12 +++++------ stdlib/tst-makecontext-align.c | 20 +++++++++---------- stdlib/tst-quick_exit.cc | 2 +- stdlib/tst-setcontext10.c | 6 +++--- stdlib/tst-setcontext11.c | 2 +- stdlib/tst-setcontext5.c | 4 ++-- stdlib/tst-setcontext8.c | 2 +- stdlib/tst-setcontext9.c | 2 +- stdlib/tst-swapcontext1.c | 8 ++++---- stdlib/tst-swapcontext2.c | 8 ++++---- stdlib/tst-thread-quick_exit.cc | 2 +- string/tst-xbzero-opt.c | 3 ++- sysdeps/generic/tst-stack-align.h | 2 +- .../sysv/linux/x86_64/tst-cet-property-2.c | 2 +- .../sysv/linux/x86_64/tst-cet-setcontext-1.c | 2 +- .../unix/sysv/linux/x86_64/tst-cet-vfork-1.c | 2 +- .../sysv/linux/x86_64/tst-gnu2-tls2-amx.c | 2 +- sysdeps/x86/tst-ldbl-nonnormal-printf.c | 2 +- sysdeps/x86/tst-memchr-rtm.c | 4 ++-- sysdeps/x86/tst-memcmp-rtm.c | 4 ++-- sysdeps/x86/tst-memmove-rtm.c | 4 ++-- sysdeps/x86/tst-memrchr-rtm.c | 4 ++-- sysdeps/x86/tst-memset-rtm.c | 4 ++-- sysdeps/x86/tst-strchr-rtm.c | 4 ++-- sysdeps/x86/tst-strcmp-rtm.c | 4 ++-- sysdeps/x86/tst-strcpy-rtm.c | 4 ++-- sysdeps/x86/tst-strlen-rtm.c | 4 ++-- sysdeps/x86/tst-strncmp-rtm.c | 8 ++++---- sysdeps/x86/tst-strrchr-rtm.c | 4 ++-- sysdeps/x86_64/tst-rsi-strlen.c | 2 +- 45 files changed, 113 insertions(+), 101 deletions(-) diff --git a/benchtests/bench-hash-funcs-kernel.h b/benchtests/bench-hash-funcs-kernel.h index 7eaa3665b6..aee1f1cdc8 100644 --- a/benchtests/bench-hash-funcs-kernel.h +++ b/benchtests/bench-hash-funcs-kernel.h @@ -35,7 +35,7 @@ #define PRIMITIVE_CAT(x, y) x ## y #define CAT(x, y) PRIMITIVE_CAT (x, y) -static double __attribute__ ((noinline, noclone)) +static double __attribute__ ((noinline)) __attribute_noclone__ CAT (do_one_test_kernel, POSTFIX) (const char *s, size_t len) { @@ -58,7 +58,7 @@ CAT (do_one_test_kernel, POSTFIX) (const char *s, size_t len) return (double) cur / (double) NFIXED_ITERS; } -static double __attribute__ ((noinline, noclone)) +static double __attribute__ ((noinline)) __attribute_noclone__ CAT (do_rand_test_kernel, POSTFIX) (char const *bufs, unsigned int const *sizes) { diff --git a/benchtests/bench-hash-funcs.c b/benchtests/bench-hash-funcs.c index 8dd88c9e39..ca199a7fae 100644 --- a/benchtests/bench-hash-funcs.c +++ b/benchtests/bench-hash-funcs.c @@ -67,7 +67,7 @@ do_one_test (json_ctx_t *json_ctx, size_t len) json_element_object_end (json_ctx); } -static void __attribute__ ((noinline, noclone)) +static void __attribute__ ((noinline)) __attribute_noclone__ do_rand_test (json_ctx_t *json_ctx) { size_t i, sz, offset; diff --git a/benchtests/bench-strchr.c b/benchtests/bench-strchr.c index eed6882085..5ef3a9d438 100644 --- a/benchtests/bench-strchr.c +++ b/benchtests/bench-strchr.c @@ -92,7 +92,7 @@ IMPL (generic_strchrnul, 0) branch coming we want to test the case where a potential branch in strchr can be used to skip a later mispredict because of the relationship between the two branches. */ -static void __attribute__ ((noinline, noclone)) +static void __attribute__ ((noinline)) __attribute_noclone__ do_one_rand_plus_branch_test (json_ctx_t *json_ctx, impl_t *impl, const CHAR *s, const CHAR *c) { @@ -117,7 +117,7 @@ do_one_rand_plus_branch_test (json_ctx_t *json_ctx, impl_t *impl, json_element_double (json_ctx, (double)cur / (double)iters); } -static void __attribute__ ((noinline, noclone)) +static void __attribute__ ((noinline)) __attribute_noclone__ do_one_rand_test (json_ctx_t *json_ctx, impl_t *impl, const CHAR *s, const CHAR *c) { diff --git a/debug/tst-backtrace.h b/debug/tst-backtrace.h index 53239dad59..5526cb2dc3 100644 --- a/debug/tst-backtrace.h +++ b/debug/tst-backtrace.h @@ -33,7 +33,7 @@ volatile int x; /* Use this attribute to prevent inlining, so that all expected frames are present. */ -#define NO_INLINE __attribute__ ((noinline, noclone, weak)) +#define NO_INLINE __attribute__ ((noinline, weak)) __attribute_noclone__ /* Look for a match in SYM from backtrace_symbols to NAME, a fragment of a function name. Ignore the filename before '(', but presume diff --git a/debug/tst-ssp-1.c b/debug/tst-ssp-1.c index a1e4fb0630..27f10edc56 100644 --- a/debug/tst-ssp-1.c +++ b/debug/tst-ssp-1.c @@ -21,7 +21,7 @@ #include static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ test (char *foo) { int i; diff --git a/elf/tst-p_alignmod-base.c b/elf/tst-p_alignmod-base.c index d6930b9f16..3f90212e07 100644 --- a/elf/tst-p_alignmod-base.c +++ b/elf/tst-p_alignmod-base.c @@ -26,7 +26,7 @@ int foo __attribute__ ((aligned (ALIGN))) = 1; bool -__attribute__ ((weak, noclone, noinline)) +__attribute__ ((weak, noinline)) __attribute_noclone__ is_aligned_p (void *p, int align) { return (((uintptr_t) p) & (align - 1)) == 0; diff --git a/gmon/tst-gmon.c b/gmon/tst-gmon.c index 9de4e7f85f..e379cced86 100644 --- a/gmon/tst-gmon.c +++ b/gmon/tst-gmon.c @@ -16,15 +16,17 @@ License along with the GNU C Library; if not, see . */ +#include + /* This program does not use the test harness because we want tight control over the call graph. */ -__attribute__ ((noinline, noclone, weak)) void +__attribute__ ((noinline, weak)) __attribute_noclone__ void f1 (void) { } -__attribute__ ((noinline, noclone, weak)) void +__attribute__ ((noinline, weak)) __attribute_noclone__ void f2 (void) { f1 (); @@ -32,7 +34,7 @@ f2 (void) asm volatile (""); } -__attribute__ ((noinline, noclone, weak)) void +__attribute__ ((noinline, weak)) __attribute_noclone__ void f3 (int count) { for (int i = 0; i < count; ++i) diff --git a/gmon/tst-mcount-overflow.c b/gmon/tst-mcount-overflow.c index 0e60f7e2e6..5fa98f3b38 100644 --- a/gmon/tst-mcount-overflow.c +++ b/gmon/tst-mcount-overflow.c @@ -16,6 +16,8 @@ License along with the GNU C Library; if not, see . */ +#include + /* Program with sufficiently complex, yet pointless, call graph that it will trigger an mcount overflow, when you set the minarcs/maxarcs tunables to very low values. */ @@ -31,12 +33,12 @@ /* Defines 16 leaf functions named f1_0 to f1_15 */ #define REP(n) \ - __attribute__ ((noinline, noclone, weak)) void f1_##n (void) {}; + __attribute__ ((noinline, weak)) __attribute_noclone__ void f1_##n (void) {}; REPS #undef REP /* Calls all 16 leaf functions f1_* in succession */ -__attribute__ ((noinline, noclone, weak)) void +__attribute__ ((noinline, weak)) __attribute_noclone__ void f2 (void) { # define REP(n) f1_##n(); @@ -47,12 +49,12 @@ f2 (void) /* Defines 16 functions named f2_0 to f2_15, which all just call f2 */ #define REP(n) \ - __attribute__ ((noinline, noclone, weak)) void \ + __attribute__ ((noinline, weak)) __attribute_noclone__ void \ f2_##n (void) { f2(); PREVENT_TAIL_CALL; }; REPS #undef REP -__attribute__ ((noinline, noclone, weak)) void +__attribute__ ((noinline, weak)) __attribute_noclone__ void f3 (int count) { for (int i = 0; i < count; ++i) diff --git a/malloc/tst-malloc-thread-exit.c b/malloc/tst-malloc-thread-exit.c index aec3897087..d21191a53d 100644 --- a/malloc/tst-malloc-thread-exit.c +++ b/malloc/tst-malloc-thread-exit.c @@ -42,7 +42,7 @@ static int inner_thread_count = 4; static size_t malloc_size = 32; static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ unoptimized_free (void *ptr) { free (ptr); diff --git a/malloc/tst-malloc-thread-fail.c b/malloc/tst-malloc-thread-fail.c index f698871876..d5bc3433e7 100644 --- a/malloc/tst-malloc-thread-fail.c +++ b/malloc/tst-malloc-thread-fail.c @@ -33,7 +33,7 @@ /* Wrapper for calloc with an optimization barrier. */ static void * -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ allocate_zeroed (size_t a, size_t b) { return calloc (a, b); diff --git a/malloc/tst-mallocstate.c b/malloc/tst-mallocstate.c index f72e1a1b28..25e3e31521 100644 --- a/malloc/tst-mallocstate.c +++ b/malloc/tst-mallocstate.c @@ -366,7 +366,7 @@ full_heap_check (void) } /* Used as an optimization barrier to force a heap allocation. */ -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static void my_free (void *ptr) { diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index ab9620bd0d..4434bd3a46 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -883,4 +883,11 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf # define __attribute_struct_may_alias__ #endif +/* Prevents a function from being considered for cloning. */ +#if __GNUC_PREREQ (4, 5) || __glibc_has_attribute (__noclone__) +# define __attribute_noclone__ __attribute__ ((__noclone__)) +#else +# define __attribute_noclone__ /* Ignore. */ +#endif + #endif /* sys/cdefs.h */ diff --git a/misc/tst-syscalls.c b/misc/tst-syscalls.c index d060b125c9..4418b1867a 100644 --- a/misc/tst-syscalls.c +++ b/misc/tst-syscalls.c @@ -37,7 +37,7 @@ struct Array static int error_count; -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ struct Array allocate (size_t bytes) { @@ -52,7 +52,7 @@ allocate (size_t bytes) return __extension__ (struct Array) {bytes, p}; } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ void deallocate (struct Array b) { @@ -66,7 +66,7 @@ deallocate (struct Array b) } } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ void * do_mmap (void *addr, size_t length) { @@ -74,7 +74,7 @@ do_mmap (void *addr, size_t length) MAP_PRIVATE | MAP_ANON, -1, 0); } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ void * reallocate (struct Array b) { @@ -86,7 +86,7 @@ reallocate (struct Array b) return NULL; } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ void protect (struct Array b) { @@ -104,7 +104,7 @@ protect (struct Array b) } } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ ssize_t do_read (int fd, void *ptr, struct Array b) { @@ -116,7 +116,7 @@ do_read (int fd, void *ptr, struct Array b) return 0; } -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ ssize_t do_write (int fd, void *ptr, struct Array b) { diff --git a/nptl/tst-minstack-throw.cc b/nptl/tst-minstack-throw.cc index b729091ec4..34b4bde825 100644 --- a/nptl/tst-minstack-throw.cc +++ b/nptl/tst-minstack-throw.cc @@ -24,7 +24,7 @@ #include /* Throw a std::runtime_exception. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void do_throw_exception () { @@ -38,17 +38,17 @@ struct class_with_destructor ~class_with_destructor (); }; -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ class_with_destructor::class_with_destructor () { } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ class_with_destructor::~class_with_destructor () { } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void function_with_destructed_object () { diff --git a/nptl/tst-thread-exit-clobber.cc b/nptl/tst-thread-exit-clobber.cc index b3b6989268..28cd769198 100644 --- a/nptl/tst-thread-exit-clobber.cc +++ b/nptl/tst-thread-exit-clobber.cc @@ -73,7 +73,7 @@ enum { no_check = -1 }; /* Check that VALUE is the magic value for INDEX, behind a compiler barrier. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_magic (int index, unsigned int value) { @@ -103,7 +103,7 @@ check_magic (int index, unsigned int value) /* Check that VALUE is the magic value for INDEX, behind a compiler barrier. Double variant. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_magic (int index, double value) { @@ -153,7 +153,7 @@ struct checker call_pthread_exit are used to call pthread_exit indirectly, with the intent of clobbering the register values. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void call_pthread_exit_0 (const values *pvalues) { @@ -166,7 +166,7 @@ call_pthread_exit_0 (const values *pvalues) pthread_exit (NULL); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void call_pthread_exit_1 (const values *pvalues) { @@ -180,7 +180,7 @@ call_pthread_exit_1 (const values *pvalues) call_pthread_exit_0 (&other_values); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void call_pthread_exit () { @@ -192,7 +192,7 @@ call_pthread_exit () pthread_exit. If Nested is true, call pthread_exit indirectly via call_pthread_exit. */ template -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void * threadfunc (void *closure) { diff --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc index 270520528c..c6d5ec2e66 100644 --- a/nptl/tst-thread_local1.cc +++ b/nptl/tst-thread_local1.cc @@ -53,27 +53,27 @@ to_string (const counter &c) template struct counting { - counting () __attribute__ ((noinline, noclone)); - ~counting () __attribute__ ((noinline, noclone)); - void operation () __attribute__ ((noinline, noclone)); + counting () __attribute__ ((noinline)) __attribute_noclone__; + ~counting () __attribute__ ((noinline)) __attribute_noclone__; + void operation () __attribute__ ((noinline)) __attribute_noclone__; }; template -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ counting::counting () { ++Counter->constructed; } template -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ counting::~counting () { ++Counter->destructed; } template -void __attribute__ ((noinline, noclone)) +void __attribute__ ((noinline)) __attribute_noclone__ counting::operation () { // Optimization barrier. diff --git a/stdlib/tst-makecontext-align.c b/stdlib/tst-makecontext-align.c index e54b3e1ff2..b3187a5aa8 100644 --- a/stdlib/tst-makecontext-align.c +++ b/stdlib/tst-makecontext-align.c @@ -30,7 +30,7 @@ static const char *context; /* Check that ADDRESS is aligned to ALIGNMENT bytes, behind a compiler barrier. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align (void *address, size_t alignment) { @@ -45,7 +45,7 @@ check_align (void *address, size_t alignment) /* Various alignment checking functions. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_int (void) { @@ -53,7 +53,7 @@ check_align_int (void) check_align (&a, __alignof__ (a)); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_long (void) { @@ -61,7 +61,7 @@ check_align_long (void) check_align (&a, __alignof__ (a)); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_long_long (void) { @@ -69,7 +69,7 @@ check_align_long_long (void) check_align (&a, __alignof__ (a)); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_double (void) { @@ -77,7 +77,7 @@ check_align_double (void) check_align (&a, __alignof__ (a)); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_4 (void) { @@ -85,7 +85,7 @@ check_align_4 (void) check_align (&a, 4); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_8 (void) { @@ -93,7 +93,7 @@ check_align_8 (void) check_align (&a, 8); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_16 (void) { @@ -105,7 +105,7 @@ check_align_16 (void) check_align (&a, 16); } -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_align_32 (void) { @@ -120,7 +120,7 @@ check_align_32 (void) } /* Call all the alignment checking functions. */ -__attribute__ ((noinline, noclone, weak)) +__attribute__ ((noinline, weak)) __attribute_noclone__ void check_alignments (void) { diff --git a/stdlib/tst-quick_exit.cc b/stdlib/tst-quick_exit.cc index 4331d80383..22789fe084 100644 --- a/stdlib/tst-quick_exit.cc +++ b/stdlib/tst-quick_exit.cc @@ -26,7 +26,7 @@ struct A thread_local A a; void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ optimization_barrier (A &) { } diff --git a/stdlib/tst-setcontext10.c b/stdlib/tst-setcontext10.c index 7267f5efe3..65a7e53f0a 100644 --- a/stdlib/tst-setcontext10.c +++ b/stdlib/tst-setcontext10.c @@ -37,7 +37,7 @@ static ucontext_t ctx; static void f2 (void); static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ f1 (void) { printf ("start f1\n"); @@ -45,7 +45,7 @@ f1 (void) } static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ f2 (void) { printf ("start f2\n"); @@ -64,7 +64,7 @@ f3 (void) } static int -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ do_test_1 (void) { char st1[32768]; diff --git a/stdlib/tst-setcontext11.c b/stdlib/tst-setcontext11.c index 1883c44b76..c768782b86 100644 --- a/stdlib/tst-setcontext11.c +++ b/stdlib/tst-setcontext11.c @@ -54,7 +54,7 @@ f1 (int a0, int a1, int a2, int a3) } static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ call_longjmp (void) { longjmp_called = 1; diff --git a/stdlib/tst-setcontext5.c b/stdlib/tst-setcontext5.c index 9b29907a13..42e87e2185 100644 --- a/stdlib/tst-setcontext5.c +++ b/stdlib/tst-setcontext5.c @@ -27,7 +27,7 @@ static volatile int done; static void f2 (void); static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ f1 (void) { printf ("start f1\n"); @@ -35,7 +35,7 @@ f1 (void) } static void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ f2 (void) { printf ("start f2\n"); diff --git a/stdlib/tst-setcontext8.c b/stdlib/tst-setcontext8.c index cdcf5eb871..d02cade70c 100644 --- a/stdlib/tst-setcontext8.c +++ b/stdlib/tst-setcontext8.c @@ -26,7 +26,7 @@ static ucontext_t ctx[3]; static atomic_int done; static void -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ f2 (void) { printf ("start f2\n"); diff --git a/stdlib/tst-setcontext9.c b/stdlib/tst-setcontext9.c index 91b6255138..579d45419a 100644 --- a/stdlib/tst-setcontext9.c +++ b/stdlib/tst-setcontext9.c @@ -26,7 +26,7 @@ static ucontext_t ctx[5]; static atomic_int done; static void -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ f2 (void) { done++; diff --git a/stdlib/tst-swapcontext1.c b/stdlib/tst-swapcontext1.c index c96b8a27a8..e10d76fe4f 100644 --- a/stdlib/tst-swapcontext1.c +++ b/stdlib/tst-swapcontext1.c @@ -29,7 +29,7 @@ const char *fmt2 = "\e[34m"; #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func4(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) { @@ -39,7 +39,7 @@ func4(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) printf(" %sfunc4: returning\e[0m\n", fmt); } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func3(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) { @@ -48,7 +48,7 @@ func3(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) printf(" %sfunc3: returning\e[0m\n", fmt); } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func1(void) { @@ -59,7 +59,7 @@ func1(void) } } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func2(void) { diff --git a/stdlib/tst-swapcontext2.c b/stdlib/tst-swapcontext2.c index a9c1dc827c..f9e5f2cdea 100644 --- a/stdlib/tst-swapcontext2.c +++ b/stdlib/tst-swapcontext2.c @@ -32,7 +32,7 @@ static jmp_buf jmpbuf; #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func4(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) { @@ -42,7 +42,7 @@ func4(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) printf(" %sfunc4: returning\e[0m\n", fmt); } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func3(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) { @@ -51,7 +51,7 @@ func3(ucontext_t *uocp, ucontext_t *ucp, const char *str, const char *fmt) printf(" %sfunc3: returning\e[0m\n", fmt); } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func1(void) { @@ -67,7 +67,7 @@ func1(void) } } -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ static void func2(void) { diff --git a/stdlib/tst-thread-quick_exit.cc b/stdlib/tst-thread-quick_exit.cc index dadccee334..a4dc03d661 100644 --- a/stdlib/tst-thread-quick_exit.cc +++ b/stdlib/tst-thread-quick_exit.cc @@ -30,7 +30,7 @@ thread_local A a1; thread_local A a2; void -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ optimization_barrier (A &) { } diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c index 2392eaa2c1..954fc61f89 100644 --- a/string/tst-xbzero-opt.c +++ b/string/tst-xbzero-opt.c @@ -97,7 +97,8 @@ static const unsigned char test_pattern[16] = static ucontext_t uc_main, uc_co; -static __attribute__ ((noinline, noclone)) int +static __attribute__ ((noinline)) __attribute_noclone__ +int use_test_buffer (unsigned char *buf) { unsigned int sum = 0; diff --git a/sysdeps/generic/tst-stack-align.h b/sysdeps/generic/tst-stack-align.h index 12473e32b8..5b622f5a3f 100644 --- a/sysdeps/generic/tst-stack-align.h +++ b/sysdeps/generic/tst-stack-align.h @@ -20,7 +20,7 @@ #include int -__attribute__ ((weak, noclone, noinline)) +__attribute__ ((weak, noinline)) __attribute_noclone__ is_aligned (void *p, int align) { return (((uintptr_t) p) & (align - 1)) != 0; diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c index 5274a09509..a72ace740a 100644 --- a/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c +++ b/sysdeps/unix/sysv/linux/x86_64/tst-cet-property-2.c @@ -25,7 +25,7 @@ extern void bar (void); void -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ test (void (*func_p) (void)) { func_p (); diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c index 388931f5f3..c0289dc701 100644 --- a/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c +++ b/sysdeps/unix/sysv/linux/x86_64/tst-cet-setcontext-1.c @@ -30,7 +30,7 @@ static ucontext_t ctx[5]; static atomic_int done; static void -__attribute__((noinline, noclone)) +__attribute__((noinline)) __attribute_noclone__ f2 (void) { printf ("start f2\n"); diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c b/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c index 56d77530ae..3e0061f605 100644 --- a/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c +++ b/sysdeps/unix/sysv/linux/x86_64/tst-cet-vfork-1.c @@ -25,7 +25,7 @@ #include #include -__attribute__ ((noclone, noinline)) +__attribute__ ((noinline)) __attribute_noclone__ static void do_test_1 (void) { diff --git a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c index ae4dd82556..bf12ed2eb3 100644 --- a/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c +++ b/sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c @@ -27,7 +27,7 @@ extern int arch_prctl (int, ...); #define X86_XSTATE_TILEDATA_ID 18 /* Initialize tile config. */ -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static void init_tile_config (__tilecfg *tileinfo) { diff --git a/sysdeps/x86/tst-ldbl-nonnormal-printf.c b/sysdeps/x86/tst-ldbl-nonnormal-printf.c index 3a60750de4..581c9c1fc4 100644 --- a/sysdeps/x86/tst-ldbl-nonnormal-printf.c +++ b/sysdeps/x86/tst-ldbl-nonnormal-printf.c @@ -23,7 +23,7 @@ /* Fill the stack with non-zero values. This makes a crash in snprintf more likely. */ -static void __attribute__ ((noinline, noclone)) +static void __attribute__ ((noinline)) __attribute_noclone__ fill_stack (void) { char buffer[65536]; diff --git a/sysdeps/x86/tst-memchr-rtm.c b/sysdeps/x86/tst-memchr-rtm.c index 7dc0718b7c..fb57bc115a 100644 --- a/sysdeps/x86/tst-memchr-rtm.c +++ b/sysdeps/x86/tst-memchr-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -36,7 +36,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-memcmp-rtm.c b/sysdeps/x86/tst-memcmp-rtm.c index 124eb17aed..24df5ed79a 100644 --- a/sysdeps/x86/tst-memcmp-rtm.c +++ b/sysdeps/x86/tst-memcmp-rtm.c @@ -23,7 +23,7 @@ char string1[STRING_SIZE]; char string2[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -35,7 +35,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-memmove-rtm.c b/sysdeps/x86/tst-memmove-rtm.c index dfb5533784..8ff1940109 100644 --- a/sysdeps/x86/tst-memmove-rtm.c +++ b/sysdeps/x86/tst-memmove-rtm.c @@ -23,7 +23,7 @@ char string1[STRING_SIZE]; char string2[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -35,7 +35,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-memrchr-rtm.c b/sysdeps/x86/tst-memrchr-rtm.c index 48512de7f4..13ed0aed45 100644 --- a/sysdeps/x86/tst-memrchr-rtm.c +++ b/sysdeps/x86/tst-memrchr-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -36,7 +36,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-memset-rtm.c b/sysdeps/x86/tst-memset-rtm.c index 60e714c757..3eb6388b74 100644 --- a/sysdeps/x86/tst-memset-rtm.c +++ b/sysdeps/x86/tst-memset-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -30,7 +30,7 @@ prepare (void) return EXIT_SUCCESS; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-strchr-rtm.c b/sysdeps/x86/tst-strchr-rtm.c index 8294cc5118..e9689f0f7c 100644 --- a/sysdeps/x86/tst-strchr-rtm.c +++ b/sysdeps/x86/tst-strchr-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -36,7 +36,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-strcmp-rtm.c b/sysdeps/x86/tst-strcmp-rtm.c index c2274a5d3e..8d1453caa5 100644 --- a/sysdeps/x86/tst-strcmp-rtm.c +++ b/sysdeps/x86/tst-strcmp-rtm.c @@ -40,7 +40,7 @@ CHAR string1[STRING_SIZE]; CHAR string2[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -52,7 +52,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-strcpy-rtm.c b/sysdeps/x86/tst-strcpy-rtm.c index 139f52004e..cb5c340448 100644 --- a/sysdeps/x86/tst-strcpy-rtm.c +++ b/sysdeps/x86/tst-strcpy-rtm.c @@ -23,7 +23,7 @@ char string1[STRING_SIZE]; char string2[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -35,7 +35,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-strlen-rtm.c b/sysdeps/x86/tst-strlen-rtm.c index 5b083f29dc..278cf27c8c 100644 --- a/sysdeps/x86/tst-strlen-rtm.c +++ b/sysdeps/x86/tst-strlen-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -35,7 +35,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86/tst-strncmp-rtm.c b/sysdeps/x86/tst-strncmp-rtm.c index ebc8837ad1..3529431527 100644 --- a/sysdeps/x86/tst-strncmp-rtm.c +++ b/sysdeps/x86/tst-strncmp-rtm.c @@ -40,7 +40,7 @@ CHAR string1[STRING_SIZE]; CHAR string2[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -52,7 +52,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { @@ -62,7 +62,7 @@ function (void) return 1; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function_overflow (void) { @@ -72,7 +72,7 @@ function_overflow (void) return 1; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function_overflow2 (void) { diff --git a/sysdeps/x86/tst-strrchr-rtm.c b/sysdeps/x86/tst-strrchr-rtm.c index 487d2071d4..35f328e294 100644 --- a/sysdeps/x86/tst-strrchr-rtm.c +++ b/sysdeps/x86/tst-strrchr-rtm.c @@ -22,7 +22,7 @@ #define STRING_SIZE 1024 char string1[STRING_SIZE]; -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int prepare (void) { @@ -35,7 +35,7 @@ prepare (void) return EXIT_FAILURE; } -__attribute__ ((noinline, noclone)) +__attribute__ ((noinline)) __attribute_noclone__ static int function (void) { diff --git a/sysdeps/x86_64/tst-rsi-strlen.c b/sysdeps/x86_64/tst-rsi-strlen.c index 2c424ffe94..b367e75177 100644 --- a/sysdeps/x86_64/tst-rsi-strlen.c +++ b/sysdeps/x86_64/tst-rsi-strlen.c @@ -44,7 +44,7 @@ typedef struct } parameter_t; size_t -__attribute__ ((weak, noinline, noclone)) +__attribute__ ((weak, noinline)) __attribute_noclone__ do_strlen (parameter_t *a, int zero, const CHAR *str) { return CALL (a, str); From patchwork Sun Dec 22 00:04:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852891 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2770964wrq; Sat, 21 Dec 2024 16:19:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXh8nTqJ6DYX1PQs1OPkga4MSmPgyViCEx2LC9mdVFlEZkpZkeA47fSpXb/9RSzXjsJoZvswQ==@linaro.org X-Google-Smtp-Source: AGHT+IH9+kpXGzIEZN6ISIxBAyJh2LG5XE1tNrzN2IBR10CbB6PErKTlq/2G8kC13PXJ47VTWXe6 X-Received: by 2002:a05:622a:13d0:b0:462:bb8d:3673 with SMTP id d75a77b69052e-46a4a978173mr149175151cf.35.1734826784889; Sat, 21 Dec 2024 16:19:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826784; cv=pass; d=google.com; s=arc-20240605; b=M3WS9qyBo+4nmywNUmkjU5+5N1nu9Sc5cgM/oZCl9zty6KXLnIYmIVMRl7K70Pcglb GPGF+yK4kNgZJ9kMstJXow/DorikRaUjd0U+QgAoVBhhb1x27XoNYzAtpU1dh/FariP3 APEGZPC97EoPukoGVIyPO66aym2JFYGIMeuVX6nxP1hl4zuXUG+5eJFCKPH0vm5DVwIp RbrzG7Q3DwttZopqYWhveuDqEYOajSdfZ7GHQsmR6KQFEzS8fgZa+mK5akGdec1GW8p+ IVMtHfs3JtLA38LE91T/s8fjOss1mTRLvvrnpgcdqaEtlnOZA36AHOVCZ09sDRprR4xD p5nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=tfXJXDEL/6XzVblV9QqUVb9uZUaJe0qDhHZJdpXocGs=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=RbDqDjEn2EJnXa43F6/RbrflFRabr/l5DHXsTsbisk48g5tMXcV1vkgtUdPFXVRh0F wS37Y/gkZfLQMdbF5tdzb7bjPwc8OP3d9AaVdR8Ryr0aS8ir5lpdTsj8Ee3agdrHq3pO 681MXNdPYkHDdN6tf54Ze+bLSs2s/plFsVpRa36qYCtOPh8qtlqW8KRYI9S4zGTWMtUL AV4F1Le8ltKnwSycmI9mCHEN+hdJ8rwb0a7j3Y3GiIxKh0LE6ZplrU8Oe5FCDQai8DMD T4fu3eigUv+HU41xI4PIIbwxW++yhlzA2NXiW28M1O4g3xoczHukDCuQRSFnxfCsiMYx TVQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TjTK0mYr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-46a3e68089fsi80211531cf.69.2024.12.21.16.19.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:19:44 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TjTK0mYr; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C57D6385841D for ; Sun, 22 Dec 2024 00:19:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C57D6385841D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TjTK0mYr X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 994553858432 for ; Sun, 22 Dec 2024 00:05:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 994553858432 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 994553858432 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; cv=none; b=K2goJE+B/EV1ODljluceqfSkp6Oehe5zE1vnjeJUiEfvhdHLSJNTfebwRlPWcHYK/GrbALm2bhF1Q6eAr/xIovZG73VpJ5ZyouLWc5VyLp13mFZVTS6/icpuamJRlf5M+X3+5uMlmbnloqYwT6bYZKv4XVV3RU/iuhvOo9X4C70= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; c=relaxed/simple; bh=tdVkun3SDMJOGelNYG5FE945sri5iCU8eUT7HYe8OkU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VHF3Wu6DjTJTRiHzD0W313d/VQhD7Suh1uRfdcVae0cXlaSGuNKtKtxc+EEtghG22fKiechljaXO23PimNfG1GAiz2eENMkoADJJ5au8IardgKlDGfrBMPmm4JAtXcrI0l1UOvhGiPqwYT/O3bWvs7gR7+lNxIFvIGijaDjOY9E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 994553858432 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2161eb95317so29624965ad.1 for ; Sat, 21 Dec 2024 16:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825921; x=1735430721; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tfXJXDEL/6XzVblV9QqUVb9uZUaJe0qDhHZJdpXocGs=; b=TjTK0mYrjuXxPIfmvC1K8PzONB0oLnXWsAUwdcIrjK3hCHuPNYiD1TM+ah2TY/lQOK CdC2XwHUPgeisSBF+M2/6+Z1DtKudwJxVf9tFSf2RroTFcFdrYtDup6KE/pil9JoMn21 NaHJUrySvGgiIuwKXzanAWdUrbP+pMMSNyq99kugo7a9mD+Bh5G7NnFp7IigycamnAFF r/sC3lzpg13T/lOZjfbJOxCPpZgZolRS4VTnFXBQ86C98aBEbopku02XFQcsN9bNQ3Z+ 4j660lwlNH4zYMJBQwck9LPMm1P7KDuf9v6sc+rXHUjDvDHXQqYByb4qdPq52H4dkRaq oluA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825921; x=1735430721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tfXJXDEL/6XzVblV9QqUVb9uZUaJe0qDhHZJdpXocGs=; b=w+hK77IsJYjguan7s5NKNDVvbtvGDireJgXNwKJDd0RKUJ4a5kA1iVwx4WdX6Lg/A6 jiY2DR7oFAInjSbAjYyKaeuauJQ51VorS77furbpy545HQtdpA3kAWJcAZVzFRE116eP s0sdlrWEa47wMeDkdzJK2WjZppwuFYQC6EYrDqiDsisNGoFPAsS1hWvXfKV2FdvxHZHW eAD3yi3Aebf3evc0t3tcOvXSq5C/dU2s2lF6esohHpRZyzPgcQbP011/+23pVkD8sEAJ zwro7mpxZJt7xl2G0Rb9BBocRtP+RHrVdCWPAf0YP+y01S9IdS93Ja8F6mE+INY5wiXP K4sQ== X-Gm-Message-State: AOJu0Yz7TQkU1RUdbTobnnWWq+qu1GyvzISLGfPZDNevcna5UVZRwCwk 02t3UqXCy1B+5ikr7FxI1cWdYZpHtkc0zg9GudslbJDXziTnn00H X-Gm-Gg: ASbGncv/wCuVbUtziwRLFJka8RzfvC8Q1Q3ItRIhbIn9st6G2UKlemRC56lbODrmHui Y8FWlydEcw8vncnAx44btf0A9IONa/nbRKxVGUnhMz56pDzyNHG1Mt2EAUVOAXE+orAVWpzUWSP k7A7WaTm0vmKLgaJ9ywnVV/R+Hbze4FY6weBSjQ/UQqFVePgmmgWn4joZZ7QE9VXy4UFlgz9TWr 2kYMBs0X1TNKJdPiJSLwaKI7B4q2sK/9ljT4rgQzrZiKJpz+cU6HIp0DSumDAftdvotvOA= X-Received: by 2002:a17:902:d483:b0:215:b1a3:4701 with SMTP id d9443c01a7336-219e6e9e9a6mr111869015ad.13.1734825921150; Sat, 21 Dec 2024 16:05:21 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9d9775sm48926135ad.148.2024.12.21.16.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:20 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 0E48FC0834; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 20/39] x86: Use inhibit_stack_protector on tst-ifunc-isa.h Date: Sun, 22 Dec 2024 08:04:43 +0800 Message-ID: <20241222000509.2205895-21-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- sysdeps/x86/tst-ifunc-isa.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/tst-ifunc-isa.h b/sysdeps/x86/tst-ifunc-isa.h index dc79d260ca..c9451ad874 100644 --- a/sysdeps/x86/tst-ifunc-isa.h +++ b/sysdeps/x86/tst-ifunc-isa.h @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include #include enum isa @@ -29,7 +30,7 @@ enum isa }; enum isa -__attribute__ ((__optimize__ ("-fno-stack-protector"))) +test_inhibit_stack_protector get_isa (void) { if (CPU_FEATURE_ACTIVE (AVX512F)) @@ -84,7 +85,7 @@ isa_none (void) int foo (void) __attribute__ ((ifunc ("foo_ifunc"))); void * -__attribute__ ((__optimize__ ("-fno-stack-protector"))) +test_inhibit_stack_protector foo_ifunc (void) { switch (get_isa ()) From patchwork Sun Dec 22 00:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852892 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2771025wrq; Sat, 21 Dec 2024 16:19:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWVA2z4XAEv0+qQaSDG8bLuwXL4IQIXVIw+JnVnqUfvcGnPWvuBSxoP32PSV+TnWD4ETWyQpw==@linaro.org X-Google-Smtp-Source: AGHT+IEPOpcpMFvNWQYGMoU2qvz7T8rM8BpdCv4df9wCFGP3o/Toz7nekVbb5Cud9H4yqc3Lv/Ds X-Received: by 2002:a05:620a:4714:b0:7b6:f219:a7a8 with SMTP id af79cd13be357-7b9ba805896mr1238669085a.49.1734826799140; Sat, 21 Dec 2024 16:19:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826799; cv=pass; d=google.com; s=arc-20240605; b=SXC43CObR2g7h60xh23zL0gCTTSUbq9CzP7137/bEzLwjSy8ZbvYDkBHhdDsAXhkcg WkbZIwP46/7eYINQ8gd4qgDt8ixCdQO1fA2M6OJlxu81SE08AzgmsSnymZ4moz8Ese47 8GT5t5/H8p3egzWjeEBrMgsQlv4HQv45UhaL/4iu9LnMceUnEyJDAOg8ac/6scPqeKTR 2TY7MW2q6CwzP5tVy6/9/UM3314YhhnQb3Cshcw9mKmvPrxjgg/PiHVBAyj2PvMz8OsX Vq1Vt5nN46asKYkUieTZQJC/yTzGxpe+Yx6eFGIR0fEpmGVcwgiTYBylTbhBoBzWzKOV 5KxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=7hkiHbiTQ4lM9EUQHOQuFxAL3gJfkAI5pNhjI9X7FiQ=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=kJwicyIZDJgTrtO76X/Kz1MoLE+C5hndUzb+aydfl1GHC3sm0H5nW1pbA8Bug5PBDw FsfDx2inNKdyQcG9Mh4FdN1uqL6We32Z698CPvVHX1JQMCZeOWSOEAiLjSTSSybuoVKC FfsemB5S30XEp6wOxJ/FR670hcHBv3PPPRWkEadPMiW4edRSzWmbBGKC8y/PKuufGUUJ KOoJOkrrD/+FlCr85qr3bYQqIjoQJNKlqpHUh/NH8uUaRaKEBJgkAYb79d3OAbBXL5U5 P8zxVDLMT/OMA3nF9CArF49KujlKux3zopvi4itCO06hdcrs53AL9OYJUzz0Yt2sYr/C oQmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mFbOPF3m; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac478f2csi756595985a.331.2024.12.21.16.19.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:19:59 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mFbOPF3m; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B16A73858D3C for ; Sun, 22 Dec 2024 00:19:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B16A73858D3C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=mFbOPF3m X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 87CEF3858283 for ; Sun, 22 Dec 2024 00:05:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87CEF3858283 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87CEF3858283 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; cv=none; b=Hu8GvhvUjIEvLsdNfpyPKOMlE2HcIxM7c5RuNR51sZ5KTJT/zdC9lq1avk+kSUGS6PZG5V3yJ82FfhiB/PIc9NEGzlR3VfOD6FKFe/L7Jg0ooDlGbNk0AmW0+y2fJe14EUXlIsVobjPaPGwvOUc5/mdmyXdh1J9cZ6zs87c2Egs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; c=relaxed/simple; bh=+Qlj/x87CpzlqQ9MWyweevsLNy9Mk2lyRYTTVYX4tVo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rLZUdiD6Qpsab5nEILBYqVoivNI2IbAFY3yityIvZMOd6s96446juWnw0tMx+b2ci6yuie4ivhWezaZ6pU/UL7NarV6RSFKtd+yS7I4LAlNPkaDTA24TgEFIMY06Aedda7t5o8liRrQys6tx7/vqOpqkSDWbHzECk1RLBeba9hA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87CEF3858283 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2ef87d24c2dso2476980a91.1 for ; Sat, 21 Dec 2024 16:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825925; x=1735430725; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7hkiHbiTQ4lM9EUQHOQuFxAL3gJfkAI5pNhjI9X7FiQ=; b=mFbOPF3muLM5mzfw7vHsPD6sVcwmrNxw8mvMCNOxgtQkTc3vCvj94L1PfQoQX7dt4N 4WKJzkkRaSfEE1yhOJHU0TJKEayVrp1vEGqIu7WSVyA4Jr3EemQC1cQekXQ8FkI4htq+ r1F9o/rpRVtizEODfW7mwmV/4AhCaLTZ58/5dVPq9Py3LE+ttrCwemjk0ZERLAAKKYV2 OmLYDUCzUobEn8I/7xrM36pfQYlNu2D9hj6tr46IUsObdIqc9+HI7PQKqsmQgCKwPBzB GPht4ASrzxGw6BYZiUFVWmmSh3Cg+4m7A9dMItUIRgERtRQLqPARaqXF8fZrinWRw6N4 p+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825925; x=1735430725; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7hkiHbiTQ4lM9EUQHOQuFxAL3gJfkAI5pNhjI9X7FiQ=; b=bKvOSEYSa0f0kOKUVfO7/MN02jYuqY5zImVI0qKOW5ibp/pbEsro693cLd3XQtcEh4 L/cgjY7NR53uLL+VAVdvucuTg7uD6sV3bT3NLk/AM/rioFZ7IQOV6S9a4ERSRy4rC+G8 aX9JgTGUmdBJHJXOECR8FR///CYifki4C36ljryy1cC1o4YoWXTXfASibrQZxbNg0r9Q Tbq/cyDnRip3BK94n0JT7FRxQjc1o9jdf/+addQXYFL5YBM1Jj9TuILsk3jVN6Qf2PwJ 8GINpm8tenKaxpupAJvL34LLDf+bs1JpOfvg/NKMifgPtg4V+P6kL7/n2wimwefvLCrk ecpg== X-Gm-Message-State: AOJu0YyuS1GBm/PFTDJVYK36cl47I1HBxQGePaVSgcJqtwgUiZM0A57a qNTUqFydwGUsWSO3ZYzriKY8ctODBKhLqU0fWEuqnt/PSkkb08r3 X-Gm-Gg: ASbGnctwT51deNxVTjaoVcBGqA38v+BFc8jYJbabKyN+7Ml5WamX7JTsANdcm/QA+Ag EPJpTTHIfauoznRFyV2r5sjpgQWy6IaNVwhiVZj65fQPJ/vV4jtzt9WDj7riLF+bwoSAL1q+Kho 6nPkOq6vRQ9i+DDEmv6zb8+32Lnesjl3wjW6PohIXIOE50W538zwOjShJxEfEIwkqnd9Ic/7Aj4 IfHUtNv7Ik+9Y06xxeHoJIwyx5vfJC6ZhUMeGaV2argLoVY+jxuqgnrSlnmnzxFe1m0/qk= X-Received: by 2002:a17:90b:538e:b0:2ee:fc08:1bc1 with SMTP id 98e67ed59e1d1-2f452eeb5aemr12172536a91.37.1734825925568; Sat, 21 Dec 2024 16:05:25 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ed644d87sm8257557a91.27.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 18F83C0837; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 21/39] debug: Avoid clang optimize away required function on tst-ssp1.c Date: Sun, 22 Dec 2024 08:04:44 +0800 Message-ID: <20241222000509.2205895-22-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Reviewed-by: Sam James --- debug/tst-ssp-1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debug/tst-ssp-1.c b/debug/tst-ssp-1.c index 27f10edc56..671e9a5007 100644 --- a/debug/tst-ssp-1.c +++ b/debug/tst-ssp-1.c @@ -22,6 +22,10 @@ static void __attribute__ ((noinline)) __attribute_noclone__ +#ifdef __clang__ +/* Avoid clang optimize it away. */ +__attribute__ ((optnone)) +#endif test (char *foo) { int i; From patchwork Sun Dec 22 00:04:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852890 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2770091wrq; Sat, 21 Dec 2024 16:16:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUPZTPFNtZqo0bCKX+2kz1/ulHVfbMxbIRqmy0/LZ6aHjPw85/VWRdWwnpNrNQpmOziOPeYhw==@linaro.org X-Google-Smtp-Source: AGHT+IGWucPnozxz8bxJ2v2Jw5UiqWBXxo9s9ugVYH+0TeH6n8RsI6GJ9JE4C18VSuZTQyBSol8K X-Received: by 2002:a05:620a:2492:b0:7b6:e697:2090 with SMTP id af79cd13be357-7b9ba6efae9mr1229901385a.2.1734826580826; Sat, 21 Dec 2024 16:16:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826580; cv=pass; d=google.com; s=arc-20240605; b=kEGWOoy4PrjDpYthF+JFPAG7UaviLBCKbicXFlA4eDWldm+LK1Gj+I9U1n5zxlUhYM iYTcRbhUaw3GYIoqEXrv3SWW4QoRv7aHuPliCmjIWSFO97fOZvtziMdF/27mTpyHUuPU wZAxxUO3E/CNtFZjN69zrIfvczZ9MXWpZA/lqGApcTg4snRIlStqaYyu54C2l4ykNtE/ NAq+pMcVmC993dNAP2I61ZlTyqA4OCc4qPjvJQa4rWpWo3kSl8xbnoF4GrI5l7hfao8V WvhJw5+sS2sAUr44Ave9gBp/bpYImPScYJqrmGd4VzNNlHVz2KbtkToywPrpwAMVY4qD Jm/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=pwrrHyujSS4Myl2i2NgXhGJUi/gyp4PWMg+knDULkbE=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=PCzCf5PokJhoSJoyeZ2gI3nepBpPTTEOmMzMsMgjySY6YLlEasbA4LI8H1C3Uk+0uj YhNMucvzKhNzpRvyMJAqkVz8vxzi1NQjYJIxYPS7tuBHTr37l0s1HttD7iIJESPXXfXF f6UoqZOKp0U9tSLLoSdY+EX2D1cF8oVxx4FRbX7VS9/i/4cBvVYGl4mMVYx2qo+tIBL7 r44mMcisDOZUw9CzLWI1FWDejUqnx8kVQupgLgiLkqGxu5XjpRPr692Ztt1dLsrqxNt3 KGQRnLzQ0RKA+30RgQcv7On/itQaGM1uc0JFbzdnHQ51RbMXLk6sgTfU5aljl/81ZFks ExKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jD9LdCDU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4facb3si760390485a.548.2024.12.21.16.16.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:16:20 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jD9LdCDU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A5303858C35 for ; Sun, 22 Dec 2024 00:16:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 8DD433857C63 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DD433857C63 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DD433857C63 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=J8BHTYg995I0ROYKFZmKifbzz157HSb5OKsQ/q1glRPHApBmJ/i5J0bWdMy036ZcuGLuJ84ZPf3wNhtQVU4nPnm0XDYc0TMief2FHp4w1a+5t0DdJzl2gDeRm5A4x5k4gYEaAtX1ipnRATiRSg/+IreOLzebTell1mo/Myl4q4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=8SVyivs9vqtv8qzMUALBsbSzGRRMOV2z+J19fsFCvIs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QQ06j5OW9/BWtUu97kvl8m6rz86L6W9YZQY+WrjP+SmwVA9qsnK+kzrBYLcQtYdM2suehsGhY5ysZgGbWlELDzoDRQT22rxtiLV2CRbE4ApHdn8Xl32jNN0bBZYD/6m2FmyCxDOrPLJUr3GILMNbgGg8IM6d1L5hfLpg3o/SrKo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-218c8aca5f1so34008765ad.0 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pwrrHyujSS4Myl2i2NgXhGJUi/gyp4PWMg+knDULkbE=; b=jD9LdCDUmDPcBSjTTksyVprU6R0eulkpDMgCE8lfuhf6nsSLaZlprlBP3YpcZl74p4 Vl1UJbYmgwkD9q/PIXxoDfgbz3nr4LbPxN6RulvPyb5JU5KIkEaIuduub18gvX7Nvf7f sKP++gEc9LPo+A8tXJqCoGWkdk/pLgqkBJ91+YC0OeqdqYauWualfqxOsBh6o281rGEr KL5CETDXlMygRNZ+YJF5bFQthoJbJWOX1NnSxUcO003AsgDAluc1LGlWFl8qojnDq0Mj laFdVDYPulzufj5ce+0w/395t01fRUdhTNRkpVsnXLYXacuLNDttWb2Ao6ZT57aYAVRp 50Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pwrrHyujSS4Myl2i2NgXhGJUi/gyp4PWMg+knDULkbE=; b=icOb01ikyzP5JSTFTVWEYxTEeOEFaVmJgFhvAmazOpgNaq0lQcZuNKcePpn7eDZmSj eNOeFyNCmCuc1HBiA+iYd7oYs5IUK24krtFF1BFwrDw2CtkIBqnGDvpY1EMkHs6SmfvX JJGEaFmQy/Vi5iLHnxuZs1+byNog78bbRqIO5WndslrWd2+veGjHk0vLn3sFcmIXiIvy 3BfJuSXuGXGZxDfBmfxT0T2IolxROv9GIvJBxXusmS8rhHT5nv5X3jpi+MR1r+XPRLK+ lFmg+708WzFhW2wQXSbqZLQGcbR/3cxTZ4BaTTIpZMIk2TlJGuvxlHBZxYTnGLAECZXc mAhg== X-Gm-Message-State: AOJu0YxUHBnW9QochkUCi7KEVnMDtq9H/x9wbfhcIrkN3NqNNHLT3Wle byNnlZdNFmp8mbkfapE48ibjUSI1WH5tIKHnib6CCiz+vBdfqRvEm+yF7DGE8Ff9oQ== X-Gm-Gg: ASbGncs2Vz6Oq7kFag3IsQRF2P2ODYOM5VmDn1iotF00TsUJAKIvbvtkfzrytJzpZBa r5fIbxse9dSoqrGlwlhy4/Vsj/3DQQUuyyf8IFqnerTNgvxocaGxvkZe4e51iFn4cstuMZ82Pma 9l4FQsEbQjYa6o8AbhcFfzx+zkpNc7u4YiINXUvnRhHerq0OMmE2YPfadoyZjuR58ixiKlBV9HG TwM7+nbwDthr42TogJKxBA/Sy6vvWv5WJGnIf/nYkV7L3tS4foT4FHnW6x5jtt/axQ4tDI= X-Received: by 2002:a17:902:d2c6:b0:216:2bd7:1c36 with SMTP id d9443c01a7336-219e6e8bbb6mr113427095ad.1.1734825924602; Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9630cesm49330995ad.44.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 23B12C0840; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 22/39] Add clang specific warnings suppress macros Date: Sun, 22 Dec 2024 08:04:45 +0800 Message-ID: <20241222000509.2205895-23-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Four new macros are added: * DIAG_{PUSH,POP}_NEEDS_COMMENT_CLANG are similar to DIAG_{PUSH,POP}_NEEDS_COMMENT, but enable clang specific pragmas to handle warnings for options only supported by clang. * DIAG_IGNORE_NEEDS_COMMENT_{CLANG,GCC} are similar to DIAG_IGNORE_NEEDS_COMMENT, but enable the warning suppression only for the referenced compiler. Reviewed-by: Sam James --- include/libc-diag.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/libc-diag.h b/include/libc-diag.h index 4b1c916756..7666a386f3 100644 --- a/include/libc-diag.h +++ b/include/libc-diag.h @@ -38,6 +38,16 @@ /* Pop diagnostic state. */ #define DIAG_POP_NEEDS_COMMENT _Pragma ("GCC diagnostic pop") +/* These macros are used to push/pop diagnostic states for warnings only + supported by clang. */ +#ifdef __clang__ +# define DIAG_PUSH_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic push") +# define DIAG_POP_NEEDS_COMMENT_CLANG _Pragma ("clang diagnostic pop") +#else +# define DIAG_PUSH_NEEDS_COMMENT_CLANG +# define DIAG_POP_NEEDS_COMMENT_CLANG +#endif + #define _DIAG_STR1(s) #s #define _DIAG_STR(s) _DIAG_STR1(s) @@ -71,4 +81,16 @@ # define DIAG_IGNORE_Os_NEEDS_COMMENT(version, option) #endif +/* Similar to DIAG_IGNORE_NEEDS_COMMENT, these macros should be used + to suppress warning supported by the specific compiler. */ +#ifndef __clang__ +# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING) \ + DIAG_IGNORE_NEEDS_COMMENT (VERSION, WARNING) +# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option) +#else +# define DIAG_IGNORE_NEEDS_COMMENT_GCC(VERSION, WARNING) +# define DIAG_IGNORE_NEEDS_COMMENT_CLANG(version, option) \ + _Pragma (_DIAG_STR (clang diagnostic ignored option)) +#endif + #endif /* libc-diag.h */ From patchwork Sun Dec 22 00:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852896 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2772859wrq; Sat, 21 Dec 2024 16:28:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXX0Pmc/lmlH+BsPu43mQNTi4UtoJb/wWYfl7rM7dHXjdzV2hC6iN9RVwRqcFQcQAVfXjfGJA==@linaro.org X-Google-Smtp-Source: AGHT+IEONNa8RIBQSYDsM/zRGdpl4K3BIrqMfMWbaRIakdrB0Ka8UGLJPzTNLb6aB8khR5fTgGbg X-Received: by 2002:a05:622a:245:b0:467:7cda:936d with SMTP id d75a77b69052e-46a4a8e0baamr123709441cf.14.1734827288082; Sat, 21 Dec 2024 16:28:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827288; cv=pass; d=google.com; s=arc-20240605; b=cSzOfnkHtDAAoPNtTTE+QuzKW7Y7sw4R8z7t89sFZAn8VdRjS4tYtjtfV3JM/XUlk1 zii9sErsJSRFkn2NOg5tHrWGj6ctV3/EvidaqWLgLR2ixO6qVKl+eBJEvHRSpnyAKi5X QezwuwQP5Sqi+xYZ18axaE1nlvVxwEO9YjaKBO8wwkFhdWmZ54GtP1dku8enScr8q+aS FCpAZHid6llvw7VP/WDoPnf74dJRr5ty519+mJJKPV3TliBEXLNnjo1GaknuGWyjNOoq sunXJNEweTKbOq1r+v9gqfq4bbQumpMksEFsSqpUxIuuDgLyRP8s5CovSOVmK4dScFf3 AaiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=CVoRHXTOC9SKeuvW6v/hz940O2bFJLtJuw0VLqShbAl/Asg3Vw5wVchLfc0MMc17Cm TBx61LdJhnsOM9t2qAG3p3kB9izKmepZ5qmZ0AVMl9Q81WyIIxkVbyIMlLB7jEgsmTQc c94amnPcJ3zkmhch7Cb1TE4KgRqMD78eruCpINWC7QOOrqAw4fq7xjAL37gVvRPpH9V+ Y8DebLRZlMsKfEJoiQu+wQKtQzqZzhyjNK4AyVxee+EDMj3JyylLtJQ2Ke/QxO6RZVPw p5vVGhgtRKtsP+kqd12pcL4mDKmJ87Ia8/F2bL0dENo4m5RK1P6vr5JOarbwfSsD/sq5 aO1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HynU0HoD; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ec05b99si58578521cf.686.2024.12.21.16.28.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HynU0HoD; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5923385842D for ; Sun, 22 Dec 2024 00:28:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5923385842D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=HynU0HoD X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 8DBC33858427 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DBC33858427 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DBC33858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=XIz7VGW9m6pkRI73jyO2MS8L5GrWAvp8CzVBFrOKWlIizhCX9QUMEKjZvlnPz5BxgXEJGQKAd1yuRQckBXoSgb9+pKc4Tj+ish8W7nV/glcM7NIiGw2Nnjvhj7aBJG/T7vzNgpyJWEyzc18f0axF2uNu7RY2eowUaQYOS9P3ET4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=7JHIyDK18zXmw6w+35Xcnbat8JDgJW6jTEUs5h30I9c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tZf6WSAspRJx1QlZiw/oa/bDf0KuOfYycRa+6wM/QzzmVa35hsJ+icA7VMWXmP/4lM7RLP/K3Z+ogzrZC7HqvwZH8fs96JwivMYV0Q2Vp1tFJW67PJGBbUQrOYkxkuQsf05F4WeTDt4AmQ7OVfrebCZR2z/qeW/xGHds9B5a4o0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DBC33858427 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-21683192bf9so32063245ad.3 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; b=HynU0HoDr5BBR9VF0r0vf2S0mOjtE63FUdJDgp7AyQ8htCOdieaD0vg2ozHCM5Vkts wGtZmhyshlqWzblNN3JL6LCkKfGTOdLueN+Q451SWahr029WkqU/ke8LR61rdo+uU+OW 1TcbbgK4ZmzxtNYghpT6JAsbax2sDJ9tTy1/QgeSNc6KUmiuMSdg/jHF4Hc7pNyYNln4 w/1xBkRSKtp30FGtAIUpEFfG8HcjB1x+SJs8cdoE+jIoeuKLTDprfdiVgbiam1Y40ltR OhQuyqfQQ6Xds/GR4NPbIpyi0iaqNXE47BDOpWhuzXVmprbGA+ykJ0EAhc+GGsorGNwd ZI8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LbVYrPxNtzOqlKEndq1g6kUmbIvifGWeVqpFlSRbwZ0=; b=htwPYmpYP7w8+Kn64DoZD+TlbLE62R+XEAToH2WZ/TYKIlgod3a8QjuuELHuR1tTEM pXIAZl74lzpXgheDbYce25enqjR3Zt18aM6k+OHYbWMEq3E4FSB2nnMs3Pcxfv0rYFZP xLLAqrbTDVbJE9NO7IDU74L9bhQMPs+pT3MRhBvE2njdSlfWWLfMOWcdlHYeSVLY4kmC qCnw90pUUuiDYAK9ywwSN214FYfR0TEo0wFTd24D9s1ND9MwP+zuuZ5tqmQu8QWwXC2I CWWPsTe5LtQMWrrniWzVoxj5gY88WqJvYAZpODQg7SPfQHabx881ximV7q80msO/hMbW nFqQ== X-Gm-Message-State: AOJu0YwiMMvDTdjJDcB4ghMhmN3z8to9nFsydFVJJ9BUGNm7B4atzqQh TLVkSPoPWFqMe96oVFx63Lr7wTHePxMqct3Sjc2/mdxv8nvkkm4DlkTxztHjkusuFg== X-Gm-Gg: ASbGncuXiTkBgpXiWj594boYQx1TQ1BAkX6BMjC88EWMy37ke+r46IGLQw+yvxV2b3t A6/ddCpJ22Xggbt8bqZd2vVBP/mIxO3pSCujBtd3snCHythHhZiGUi3ptq8LOXmFkahUFINr3yq CdyeC3IwYhVagtUgQ6wWnR3JS5fZN6MSb6XHyA9LdZlYRIwk+4lJRb9et8NCskt249jX60+WoYb vJpGjPPQp2cMEK0pYoR2gJLv9KcRZrBWY/NUEPbH7ICm8VAVGmJT7PqXwUw5Rz/Vc3o88w= X-Received: by 2002:a17:902:ea03:b0:216:5e6e:68ae with SMTP id d9443c01a7336-219e6ebaf33mr113986285ad.31.1734825923873; Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9629d0sm49216085ad.41.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 2E61EC0841; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 23/39] elf: Suppress clang warning on tst-unique4 Date: Sun, 22 Dec 2024 08:04:46 +0800 Message-ID: <20241222000509.2205895-24-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang warns that the instatiation of the variable is required, but no definition is available. They are implemented on tst-unique4lib.so. Checked on x86_64-linux-gnu. Reviewed-by: Sam James --- elf/tst-unique4.cc | 6 ++++++ elf/tst-unique4lib.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/elf/tst-unique4.cc b/elf/tst-unique4.cc index 575c70d3a1..ab727b8dbb 100644 --- a/elf/tst-unique4.cc +++ b/elf/tst-unique4.cc @@ -2,7 +2,12 @@ #include "tst-unique4.h" #include +#include +/* clang warns that the instatiation of the variable is required, but no + definition is available. They are implemented on tst-unique4lib.so. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wundefined-var-template"); static int a[24] = { S<1>::i, S<2>::i, S<3>::i, S<4>::i, S<5>::i, S<6>::i, S<7>::i, S<8>::i, @@ -10,6 +15,7 @@ static int a[24] = S<16>::i, S<17>::i, S<18>::i, S<19>::i, S<20>::i, S<21>::i, S<22>::i, S<23>::i, S<24>::i }; +DIAG_POP_NEEDS_COMMENT_CLANG; int main (void) diff --git a/elf/tst-unique4lib.cc b/elf/tst-unique4lib.cc index 17a7cdf567..2829e75cee 100644 --- a/elf/tst-unique4lib.cc +++ b/elf/tst-unique4lib.cc @@ -2,7 +2,7 @@ #include "tst-unique4.h" template -int S::i = N; +int S::i __attribute__ ((used)) = N; template const int S::j __attribute__ ((used)) = -1; From patchwork Sun Dec 22 00:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852893 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2771172wrq; Sat, 21 Dec 2024 16:20:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVhi2XL09kzxno7uxhmABZij+ITBdb0oqV4GCMg1n9BRjlZnBYY/S6yiHaiwa89NwQVpJdnQw==@linaro.org X-Google-Smtp-Source: AGHT+IG8lcwgjVFzcchz4vDBfDnQTCAjLE/zplW2UIj/YQB/D9qVAY0/2oBDOvkbzpjRZ2QZcmJU X-Received: by 2002:ac8:7f94:0:b0:467:5367:7d09 with SMTP id d75a77b69052e-46a4a8e15aamr130980941cf.16.1734826835418; Sat, 21 Dec 2024 16:20:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826835; cv=pass; d=google.com; s=arc-20240605; b=kyz4GAtiRHbSDTPTA0l9UI+CbEcGNMrNKc9QzERm8RgNMkS0pd+3XptruijxVVBs0j Nd/frKyW3Z1h3W7FRi4RVMO30KLkiEAszGnkWuwMZORlJRdLZ95CXNBWGQzPBIsysZ4w x+QwXSLie1FpxSV7z/Vyj/OPyle1L4ObNh21GVbMEW7h1cwsQjHX/Gp7LrFdTa0Z8wGV IHmW6d5uBGnxRPxgLq8pk50E+jZUbeBV7WlFconz/7x4AKNv2HXt2+zCTMkjG1Ds0kZ2 WPEwMAtfDkRZ6RJ0f22Exb2lJre5uK8TJHFJDG2hqyHZNxhWG4rppn4G0NKC3DrePcYO CsEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=UhMTNy4+1QfutFFaCG7KQaGGUcGybhbqwATCTM6Dqu0=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=M0DYi6Rwgw50xxps5vbOosF+kK/fSyRu8JrX0hOiCvYW5YFlea8GmBmjCrHHpnWOXp 4amiQYvGTt6En13bNJ8e2zDBsJzTnrSmKDQ7eiT/smsrYUs94H5H7qb79Eq3iIDU3Pue ze995rZCNfxwQYE0UNCcRT5zEI6kmIolvF5g7PfmxfX/cCK+95YFJIr6h4Ql1vXY1QKL ApCsBDOKkqiB5pvN03SM6raBZZe98uwVfWQVMvgnvW2O/USQOCPkLPUtUo0WJJkoN3dU owp1++ecfCmhoD02tmSPtaRd2pjj1Tz0kRZKox+9Y8WDnGI+/qW/pBGXxIx3dKUKnMHJ sYNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PGzdlSl0; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebd5d40si70498441cf.515.2024.12.21.16.20.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PGzdlSl0; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E16003858415 for ; Sun, 22 Dec 2024 00:20:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E16003858415 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PGzdlSl0 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 8E5233857C68 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E5233857C68 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8E5233857C68 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=JZCFjbBTdWnSJJI9AbK8t9+3elEx+qjTeNLcYklAxlswc+w0zFnQKBDk7+NKSirRZKqfRgQ9NMRD7tJRq+tliToVVlmZ5UJuRZixqQKj8foNzJgi6NM+U+XsdLR0qqgL56GRjHRRJtmwF1H5wuwy4F4No2aGQ0VENAeXTVogZAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=QrEbynxbbOyLkrKqWb904hRHFxaJZn6r6fHMUexVcD8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rFKInW3v78UxNRdtSf8G07nAaP1NYfDoj6QZIXIHDLWeyfGv9oAxbJKmJrYN2P5sm+O0Ge9GH086eLVxTWK7KXzz/R6VOJl3FKUzdAY6rfbC33POuAJIBYe7VlcBYfoGyat6J8nNtBnfrzWXJNTwkaP3Kg4I96jb3V0ocGmti8M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E5233857C68 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-725f4623df7so2992299b3a.2 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825923; x=1735430723; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UhMTNy4+1QfutFFaCG7KQaGGUcGybhbqwATCTM6Dqu0=; b=PGzdlSl0R5UHPu1GuXzJcsB7oegNtfyKMBDAifrXYUzyERPpV/PlNvHzDym5AXBggH erF2VsM7btaMfgKN8ZoahoM6/3GV+BWLLxhBVXTBZZ6QpB2ScgvcLJoelZ1ZRJ5cmlsM lwtFTHsHYQaQ5solvZkOzzV3R/550mrJ1D2FfrzrJ65hHUKqkEEMnyghzCi7QxA2z+wj r9G363NcbrqUUjA73C1aFS5URGdpmAo/aeY3Q7/0YuDhoWSfOsNmsC8SqY0zbqjQRbQK QuRFuI5G1ylSe5sgiWEZJSR6eV+CEgVZbcqEl7TvcoIr2HQf1cRqxpH2F7a4pMhwlhMq 3ejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825923; x=1735430723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UhMTNy4+1QfutFFaCG7KQaGGUcGybhbqwATCTM6Dqu0=; b=AISpSlidIytIT8xLc661gdY7/sA5M/aBuApitMloGBrd9UT9Mkq8ph8veX66Cx/zgL qNh4UpIXKlPTLSUb6ON4xeFqJe/jzWOAlN/m3Q0UnOWYbt4R/jJorlNeLERzovuYhcDe qf4PXfm6cuyaWexymr2TuzfYPL62SkBqGgz5HqUw9vzjbRHz1Grn3pjj/ikOTrlkKwki xKQmJiR1G/Xu6Kjkt5GK/UvkjFpschpS1s0i66478h0ypwr+/ztEY00aaRVlRUtVUXL5 w7hkbag1IhYO6d7mt8jGhvHNn7xj1Y7LEg8dzjs6Mcv4brC2FpIgI+dGJNXH1YmoFzLL OKwQ== X-Gm-Message-State: AOJu0YyW6kDvUgYVwlEviqWHcNw1xNm9qtOndOLbHfakdf1HHm/WMVhH rEGt2RneK4+z97wkaxcTwzDgstKUvP0s/VyC1bEHx5maW+aWH3JPJYjZIoZY3c7MLg== X-Gm-Gg: ASbGncuax99P/W2xx/Plgr4jeYlCH/rsO6WeL0aW2gR/yUMqF7mg/mw2CDGERyu5pUh D+cKP2ESMBoVP+IKcpeA1aCOiUwsu0brAFRH8SwMDqrwCE1sNCcP7f8hmRz3G9I4qptRGeR5/Sk 6NBGZdeMs7JtbBXZL/nvS/sDhy9P6PsjWDM4jJ/QyXAGSdg4a0YC2s/jkpaDDit7nxOXflae4JU KM30Ba807D4pvwWGqxxoTlySp/XVtFbigwaJ1AUb3wkfnzBHQYXo/c3gKMF1CeSAIfMxwc= X-Received: by 2002:a05:6a21:3115:b0:1e1:9fef:e959 with SMTP id adf61e73a8af0-1e5e04a4443mr12196922637.27.1734825923165; Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad836bd9sm5293394b3a.78.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 38DC0C0AA2; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 24/39] localedata: Fix clang warnings on tests Date: Sun, 22 Dec 2024 08:04:47 +0800 Message-ID: <20241222000509.2205895-25-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang does not support 'I' specifier and handles it as a 'length modifier'. Reviewed-by: Sam James --- localedata/tst-trans.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/localedata/tst-trans.c b/localedata/tst-trans.c index 2819bb32cc..3c0db4d5c1 100644 --- a/localedata/tst-trans.c +++ b/localedata/tst-trans.c @@ -22,6 +22,7 @@ #include #include #include +#include static int do_test (void) @@ -59,7 +60,12 @@ do_test (void) errors |= len != 10; printf ("len = %d, wbuf = L\"%ls\"\n", len, wbuf); - snprintf (buf, sizeof buf, "%Id", 0x499602D2); + /* clang does not support 'I' specifier and handles it as a 'length + * modifier'. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (16, "-Wformat"); + snprintf (buf, sizeof buf, "%Id", 0x499602D2U); + DIAG_POP_NEEDS_COMMENT_CLANG; errors |= strcmp (buf, "bcdefghija") != 0; len = strlen (buf); errors |= len != 10; From patchwork Sun Dec 22 00:04:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852902 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2775952wrq; Sat, 21 Dec 2024 16:41:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVOulSLbKV4P8NzKGBtnrzCz+/LeMh8/zV+hGSougwzslCAFzM65osVAVyQk1QJXRVE9HX8XA==@linaro.org X-Google-Smtp-Source: AGHT+IFV2Jx7LCdJgG2Gh7kCMpS3dDz/cALiUet3qUADeCED3INqHopNCueRRLeymhmp8PUP97MU X-Received: by 2002:a05:620a:31a8:b0:7b8:70b2:5093 with SMTP id af79cd13be357-7b9ba7f6879mr1206815185a.42.1734828060428; Sat, 21 Dec 2024 16:41:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734828060; cv=pass; d=google.com; s=arc-20240605; b=Gn8WJ4Vy1OJfVZq4+8yAd+AS7uZuJGPHn8T3TziOz470BcDvudhDiEjOnnQl/Q7U2k Clr4JFAGu7LppZikZ1EJNClpxl7ZpmvXNp57PeXuaJ/+H1Kcoe92srR5t5FrE6gepsn1 NbdD5xH3rLve3NJeytl+MtTN3SMtfkQR+e8sVG/lZuTZ+4gzsNfRBEDRvt1IFF/Xbky4 EN1NP+VYu5nlds6FyfvOACEztTSQbm8/BN3jV2Hf1o0lZAKADKA2g+VkGVT7YC82nih9 fVUvfvC16zuZVJPFgw1rjODt/1hmZSfVBljg88duF7PD+hkZr5KT6tkFfUA8952cVF+e HsdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=/eoQG2VwCdm3jrQmhGROqbPOjaFcULIkd6yr8nvjpIw=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=SQ8a13zcM4ynFXbhDur4Lm47Wp6RG4xvZW5YsXvlkQ4C2zW+GUrwQI1i6Ambjna394 ZV44RMr574RkCYBZhVlIdqFG8zwwyyymJj8Hmq4G0hKHFNdFTZzGXdLW3BJV2Q0T2wII 1luc0MgLDlnWRQo5yu74O76PYXg7wt/kJCbnfVmeYlMhpekk9q7OgXR9J4hM2kVu7HE2 9oXFfaCmiF3PwYH4jzke6Ncy0HVBDF2LmyaG+l8cQsdS5iiQKF/vKtgAJXoiMhNu1ium j2uKrk4xnfn+I3DgWfiNUGK7bP3lJtUJrLt7/uzTZTKvFnofLOHdVQBUgYwBkrIuStf4 EwJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UoiR9Bn9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2ad369si806761385a.22.2024.12.21.16.41.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:41:00 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UoiR9Bn9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFD2C3858408 for ; Sun, 22 Dec 2024 00:40:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFD2C3858408 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=UoiR9Bn9 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 8CE323858288 for ; Sun, 22 Dec 2024 00:05:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CE323858288 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CE323858288 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; cv=none; b=t/c/CWeNSSI+Q0X180Sy+UYXcqFav6PoFU7SSBXaBWx6ohFQVbAH5QMJFUt7CqpCgDrAW9tdoyDtRh7Q6qZwmpf8A2V7Q+gTxZXTAcmozPU8UraklCDoscNEY0etBfgwvFo2BxJ2jyo2g3FqO2N+5zVOhiFp3ylwK3aS5yl42HQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; c=relaxed/simple; bh=dqecXDurbaU1EBRtbrVLgH6cejlBLKSUTvyJied0Rak=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=vxJ+6r6z8lfTi8svDftSRGnuPpeK+RFiZk4D9dWa6/FYpFLJ6hltoa055RjsRVelfkNBZsLSmF6T71/SktEoQm5/00puJROMTQqC/jQkOp83J3pCk010CcGXZCZgJ/LGrj7GaLNJhaM/tGcww7zbmlFTfPuKF928GsxqmnhAMXs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CE323858288 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7ea9739647bso2001607a12.0 for ; Sat, 21 Dec 2024 16:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825925; x=1735430725; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/eoQG2VwCdm3jrQmhGROqbPOjaFcULIkd6yr8nvjpIw=; b=UoiR9Bn9ij0BxR3kOmuNGcKGPHoyKzd1xtV/YW+MG4nIXjGRPMWhUf2YoN7iJsMCuw /I95t9vwySiG+lJKXGnxKnNJylwgRGXmHWr1N3437YU6IfXD4e5hCwmjAzDUcPCy7M4e yyOG8dIw5fvDtISu+Gkne0jtonH/olXAPTExNEd+1aSMyhV6Het0UGGjeBdIqocwIRHy G3DQFsE41Pqva3WGZIn42gj2nKi/tt3MdB1m86GvKY+K0UbPdGb3HRwEnd8Z0C06j+dy 9lr/5F061CA5Rj9N+icRQT6/diLQ/TN15Oc6f1+X0nnEWWjcsbSxoYXjeG40VXN5f72m IXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825925; x=1735430725; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/eoQG2VwCdm3jrQmhGROqbPOjaFcULIkd6yr8nvjpIw=; b=EPbOoKKYyrzytjz4f+dU/xi4AKbioMg552mwHrBwCbhP7HM9mCzoszFPSH0dXMF1Fk s1olYlktl5RLQL8rrFoJ4Vy2ovt4pyDR072wKJju95QtiMlwiPh8NXcNr9UZ63BBcHVo hVAMVw7LbAjwkRDY6Ia3HRZObdAX+D4+mwVS55NMzBgtnjaqc/qxAaUv8KaRhmo/xH7c 8nYZOcePGIliXf7pYumtn1pN00AyhVe9v2M8ZFZsN6z3dGpftKluYvFnw8pUu36aLpE/ 9bu4YkWoSnddtuZ87T46q0SL+mJmtehDpuaCVhFxwH7OBDvk/1rtzWThzgATWRvLlrdw X3+A== X-Gm-Message-State: AOJu0YyQT7Bs6JnpsOkpFgDmq232AMv6TjIZbtFleO9aCyL9FepgXsLD 3Lt2dAdSuUKw8IbyAWjB7njWJHfDEAA2kgy15gR54XDPZwLcs1M1 X-Gm-Gg: ASbGncuhAhyGClq7ukhIl5M9SnQXShxEfYmKxf5osFpHx+qJyVun9ebuUG19TH+fF3s efjxJB53ecxok2b3RRpXT04PgiAK7K7FbDik1vUHLUqZZxn3SlD9wmiOMi/4B8t2v5MZveEXzh0 tcjfWFR0yNWy8q2aRbU0PWvCiPaEOtcZSEEc9F9tAx/RYGNWhMicxnJkriaHYuswxSPATy8+UyG mTOj6kBUKhlPN+e2RIlVw0QPxg3jmQkpqHid6sBDlypzebxrQR7kMvU4Cxx6tCIAS5ph6s= X-Received: by 2002:a17:90a:c2c4:b0:2ee:f076:20f1 with SMTP id 98e67ed59e1d1-2f452d259fbmr14178600a91.0.1734825924842; Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f4477c852csm5572443a91.22.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 4373CC0AE0; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 25/39] stdio: Suppress clang warnings for tst-unlockedio.c Date: Sun, 22 Dec 2024 08:04:48 +0800 Message-ID: <20241222000509.2205895-26-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Suppress the following -Wgnu-folding-constant and -Wliteral-conversion warnings from Clang: tst-unlockedio.c:35:12: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] 35 | char buf[strlen (blah) + 1]; | ^~~~~~~~~~~~~~~~~ tst-unlockedio.c:63:36: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (blah, 0, -0.0, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:61:33: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (--cp, 0.25, 16, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:59:37: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (cp++, 16, 0.25, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:116:34: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (buf, 0, -0.0, fp) != 0 ~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:114:32: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (--wp, 0.25, 16, fp) != 0 ~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:112:36: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (wp++, 16, 0.25, fp) != 0 ~~~~~~~~~~~~~~ ^~~~ Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- stdio-common/tst-unlockedio.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stdio-common/tst-unlockedio.c b/stdio-common/tst-unlockedio.c index 8ff6b074b0..7f156b3c11 100644 --- a/stdio-common/tst-unlockedio.c +++ b/stdio-common/tst-unlockedio.c @@ -32,7 +32,10 @@ static int do_test (void) { const char blah[] = "BLAH"; + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (3.4, "-Wgnu-folding-constant"); char buf[strlen (blah) + 1]; + DIAG_POP_NEEDS_COMMENT_CLANG; FILE *fp, *f; const char *cp; char *wp; @@ -51,6 +54,9 @@ do_test (void) fread_unlocked below as well. */ DIAG_PUSH_NEEDS_COMMENT; DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero"); + /* clang warns about the implicit conversion from double to size_t, + which is required by this tests. */ + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion"); if (ftello (fp) != 0 || fwrite_unlocked (blah, blah - blah, strlen (blah), f++) != 0 || f != fp + 1 @@ -104,6 +110,7 @@ do_test (void) /* See explanation above. */ DIAG_PUSH_NEEDS_COMMENT; DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdiv-by-zero"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wliteral-conversion"); if (ftello (fp) != 0 || fread_unlocked (buf, buf - buf, strlen (blah), f++) != 0 || f != fp + 1 From patchwork Sun Dec 22 00:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852884 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2768916wrq; Sat, 21 Dec 2024 16:11:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUKMrkKK8swV5cU1rkWBArqXhy9/ixGYl+KuGWIGf9tHML6qNcwd81A3gXFjSlnfcO19LR3HA==@linaro.org X-Google-Smtp-Source: AGHT+IH31JrLNO6D3Do1GRBIzdQODg6Dp9zWPfHMR5gB8bCsIUXGIqGV/UXuvHOnignp+24RaF5g X-Received: by 2002:a05:6214:c6e:b0:6d8:ab3c:5e8 with SMTP id 6a1803df08f44-6dd2335ddbfmr114025366d6.29.1734826316092; Sat, 21 Dec 2024 16:11:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826316; cv=pass; d=google.com; s=arc-20240605; b=MtYWH97r5ARMVs8BSrhn9AjUPMCJGNJTSENSpXvIWzJ1uVhosF0Q/UNu4SO/LVLdXU chtzsqHljkCxjzfbqDUuxVIYSRYol1CZd6PklFxl50wBNPLilE6B8IBHqLbGQh3ifFog /Viz4YqTxGk+n+Rdc31kOYozurXLSXgeyaIo057YYRHPk/tpqzLzomxIA1qSp6LZNZCx eFOVYLMdSy0o9gocY5SGgw2KIEMw7zS9/jZxZExl4rWusZ4bGFFdpwGltcEoODHjshtN /Ts+aV7vvzxV7vyqqRyMPmCL8KuWagJBRdggfJLEJ2rODAI6NJu2K1DzVyATljz0Mf0L dcAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Or4dF0rvG7MszB1UGemXhk/dh+3FveWLDf6tKUwPKiM=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=HLolOy//dWCZQ8Sy7wzrdNsTaZTKYhSGIqnsbWU9FoDQzNpXprGzfyEQLnEXKXp8oE bSU5VFWDCyrgDJ/YpFBZq+5N7Ps1pCUoPQKBe38FdFE7X/PRIrIPhnhlcpkjYTwotroc 7PpqEAJdeQeaSNmdpuwXM9yRg7sbg+ZXvfTmu/LpO2rnnp0z3h/71sSvkcFjC1hk5VeW w6rBD5zMSOieMzANKyZ25R5oN0C30jZlLxsD6tmjAmlaDfVg5LuO2J+t1ziny9XW6GVP tmyxm6Jc7JZp+mg9jLEqCsQoB/Wa52JtKE1nfwzGLVFG4P7fpSjd5QJZgWZXMRp7oIqH 2EeQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SOgTtNyH; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd18252741si72874196d6.348.2024.12.21.16.11.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:11:56 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SOgTtNyH; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B6E02385801B for ; Sun, 22 Dec 2024 00:11:55 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 8FFD23858023 for ; Sun, 22 Dec 2024 00:05:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FFD23858023 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8FFD23858023 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::535 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; cv=none; b=LT0bPbDIJNsUvl51/zhfEcz/vG3HoApwVyh5aPdNSIhjq2koAm5YJjTvHJA+a+1DEMWmKoWdAl07g2yGJXWjqpy8eGuEBNCyaK55t1yen2USkrW6Xyzt1oaU2scb6A+fp68oVuZG9YojahSSgozHOevB7qPOxUox/FSy1gA0Wic= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; c=relaxed/simple; bh=Nppd87TTeZaYO/gyNnr1vuKxyBP4IhhVzkLFfPggfao=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jF+7aJzY+hLVsxWx2oDZIuuXtUI7vckGPaa6DNqqxUMD9X2NWROEFNccs3h5C2Qy3rDDGBGMVLLeKzpfToA8Xj2bKPpCor5NQSaDvWLAjeDdff8rbUex16l+qTo5VwQi4l3eRx7072CxE40lzrm+n4Ysw3mi6+aH9XgOBDuAO+8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7ee11ff7210so2287763a12.1 for ; Sat, 21 Dec 2024 16:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825926; x=1735430726; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Or4dF0rvG7MszB1UGemXhk/dh+3FveWLDf6tKUwPKiM=; b=SOgTtNyHQL3hPtjfZ5XcOaQhMErDMvrjOWS5KXUIm/JlVSr5GccJp+MMxBVkIBpI/w t2alCgs4/x3fGMueCS+vkxAnuHlaTaoCSDWts4RHAhD0WkLdkFFyZjektr4DSwRas5PG Yzhs8cZ7aOsXN3t/ZK56gr3If6kC8xY8LGRlgWoVvdPr2gdTjeVurN2OsWWIIffw+g77 /RncrzP2O11bOQeEmPXkNt/3rHj1Tc1Eu6jAlW5AEDIFkaRINJW04mnDGFvfkHGNNlqr BwdiOj3pdBVz6TAqKHY4W5a2cnpDy+uvWWk3LFsgEkLQwGXq8n+guiHkc3IbWg8ZicMX yzUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825926; x=1735430726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Or4dF0rvG7MszB1UGemXhk/dh+3FveWLDf6tKUwPKiM=; b=di0mS0TtAWNfEmoMySJpFLM+rdID/JV35lZsaoZL5r29RFiogZtmLg1y4BWWEl1DxD 71p7JjAM3TPppOA68TLiAoLn5NPhJvTiUIB6SUv3fuRXYa/RSp4j0ZUv2vHZQwS/Bsz6 vbvKbeUgAFRjBz/evlEWMvihqiOfB0ljNlQ61667uyJxlCRAgCL5quofeATuiklP//W/ iWGGHHR7jNWNsZ7CZIT9cXDno+LROlUcBfM5G3CihAMl9FOZOOGilu617ZjvxsO8CNaC hMCIXb0eBU2AqfzgeFE0TW0UbX/jY0TKqDLgyzhduMfY0eoqzOOnKUy188i9o4Ly7kqp B7Qg== X-Gm-Message-State: AOJu0Yzc7vlKtLEhHX7t6rkg1NR9ZU5pmpBziouXqchs/+4IM0j2bRBl nli+Ko2fM6PDpPgcbVCwWD3ZCejsjwOkcZLIX+xgLMPcZWcF/D4L X-Gm-Gg: ASbGnctx2dqZsBRY89JNDpfcyvSE4xW8XPHdfru8BmgLuEQB5QtvMk54Dwf/BqXlLz0 1G+nhwULWasc+irY/m9EROzBnnKcHlxycLRa6K0cXgv7xSAl+6+C3IEMZ3Zv4q248GRlFX77oo6 XcNHq9LuTGoVAVU7Vhc6x0gQ37hiDzH1Y/T3pC3umhmhAvNUfABrpBSm7XHZlPQJBtMxblpdj11 mLEvzK35VUNjUqDDX4bMezvbyvkCTJlSL9Q2LQ3Ux5T/bnG6LlHcqfI8BE8BwWxrzEkUPY= X-Received: by 2002:a05:6a21:3996:b0:1e1:c4e4:8898 with SMTP id adf61e73a8af0-1e5dfb67313mr12734248637.0.1734825925818; Sat, 21 Dec 2024 16:05:25 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8164desm5274686b3a.18.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 4E465C0AF2; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 26/39] stdio: Suppress %Z format for clang Date: Sun, 22 Dec 2024 08:04:49 +0800 Message-ID: <20241222000509.2205895-27-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang does not handle %Z on print, and just suppressing -Wformat-invalid-specifier might trigger another warning for extra arguments (since %Z is ignored). So suppress -Wformat-extra-args as well. For tst-fphex.c a heavy hammer is used since the printf is more complex and clang thrown a more generic warning. Reviewed-by: Sam James --- stdio-common/bug1.c | 11 +++++++++++ stdio-common/bug5.c | 6 ++++++ stdio-common/test_rdwr.c | 7 +++++++ stdio-common/tst-fphex.c | 5 +++++ stdio-common/tstgetln.c | 6 ++++++ 5 files changed, 35 insertions(+) diff --git a/stdio-common/bug1.c b/stdio-common/bug1.c index 18e7d4c257..f23ee5b6bb 100644 --- a/stdio-common/bug1.c +++ b/stdio-common/bug1.c @@ -1,6 +1,7 @@ #include #include #include +#include int main (void) @@ -13,12 +14,22 @@ main (void) stream = open_memstream (&bp, &size); fprintf (stream, "hello"); fflush (stream); + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); printf ("buf = %s, size = %Zu\n", bp, size); + DIAG_POP_NEEDS_COMMENT_CLANG; lose |= size != 5; lose |= strncmp (bp, "hello", size); fprintf (stream, ", world"); fclose (stream); + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); printf ("buf = %s, size = %Zu\n", bp, size); + DIAG_POP_NEEDS_COMMENT_CLANG; lose |= size != 12; lose |= strncmp (bp, "hello, world", 12); diff --git a/stdio-common/bug5.c b/stdio-common/bug5.c index dfa19aed55..c46810f94c 100644 --- a/stdio-common/bug5.c +++ b/stdio-common/bug5.c @@ -6,6 +6,7 @@ #include #include #include +#include #include @@ -30,7 +31,12 @@ main (void) return 1; } for (i = 0; i < 1000; ++i) + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); fprintf (in, "%Zu\n", i); + DIAG_POP_NEEDS_COMMENT_CLANG; out = fopen (outname, "w"); if (out == NULL) diff --git a/stdio-common/test_rdwr.c b/stdio-common/test_rdwr.c index 67fbe4e1de..8e501ba20f 100644 --- a/stdio-common/test_rdwr.c +++ b/stdio-common/test_rdwr.c @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -54,6 +55,11 @@ main (int argc, char **argv) rewind (f); (void) fputs (buf, f); rewind (f); + + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); { size_t i; for (i = 0; i < replace_from; ++i) @@ -101,6 +107,7 @@ main (int argc, char **argv) lose = 1; } } + DIAG_POP_NEEDS_COMMENT_CLANG; if (!lose) { diff --git a/stdio-common/tst-fphex.c b/stdio-common/tst-fphex.c index efba482537..7c0e4bd6fc 100644 --- a/stdio-common/tst-fphex.c +++ b/stdio-common/tst-fphex.c @@ -3,6 +3,7 @@ #include #include #include +#include #ifndef WIDE # define STR_LEN strlen @@ -56,10 +57,14 @@ do_test (void) int n = SPRINT (buf, array_length (buf), t->fmt, t->value); if (n != STR_LEN (t->expect) || STR_CMP (buf, t->expect) != 0) { + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat"); PRINT (L_("" S "\tExpected \"" S "\" (%Zu)\n\tGot \"" S "\" (%d, %Zu)\n"), t->fmt, t->expect, STR_LEN (t->expect), buf, n, STR_LEN (buf)); + DIAG_POP_NEEDS_COMMENT_CLANG; result = 1; } } diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c index b2e8263283..c0a64d22c7 100644 --- a/stdio-common/tstgetln.c +++ b/stdio-common/tstgetln.c @@ -16,6 +16,7 @@ . */ #include +#include int main (int argc, char *argv[]) @@ -26,7 +27,12 @@ main (int argc, char *argv[]) while ((len = getline (&buf, &size, stdin)) != -1) { + /* clang do not handle %Z format. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); printf ("bufsize %Zu; read %Zd: ", size, len); + DIAG_POP_NEEDS_COMMENT_CLANG; if (fwrite (buf, len, 1, stdout) != 1) { perror ("fwrite"); From patchwork Sun Dec 22 00:04:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852899 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2774486wrq; Sat, 21 Dec 2024 16:34:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWO3D+hOCgwSGgqFSSIEWDUFvSJnaZ+hu+KG3T1Wbmh1Ddb4ySUF5zLccYGcqEw77hgMm8+MQ==@linaro.org X-Google-Smtp-Source: AGHT+IFLRnwJzMJNPVqo5s9ptrC3iLj82B7w3K0ap73RlSfWyPTaWNZn3RblznSNjPk1RevPqo9V X-Received: by 2002:a05:620a:2449:b0:7b6:e8d4:9b7d with SMTP id af79cd13be357-7b9ba7a3630mr1589750085a.30.1734827690919; Sat, 21 Dec 2024 16:34:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827690; cv=pass; d=google.com; s=arc-20240605; b=TVvHzqZlbGN/LLYVh4o1uDJQ5CjI9URdxh3ybpTJtmJrVzuwgISI0lydH954xxcCTB CI5ZIDL0NcxRzBpkzmL/6anl0sPona71LWqCjoBTiWhf8hQGwz09PldimfetR/tSrBNL yWin0qWGveA6nBTOwwxymo/abE3XsEhc8zimJrjrinaT+BgnlX5h9bO0i0o6IEHTILtz 4t2dSTkulE/gVFvgQCVMea4X1w1clqykNHXZmIgPKdx5VuWPlfrKLBiUTpBZrs7ywXdO UGJFFdChvwjdenCzVpptZqDK+820jf3R0EpseBu+HP2FTjVl3l0MeXu4TUxJMsHIoeh8 +KDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=x81pIe9TPEVQHB7z1ABuhVi1V7eFPEH0BsguEnIbkUE=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=LrB3xzIciDhtr4w4dW9nYxQwS77Z9qPi1SHccgfMzSDsJ5C1gTUT6JS2M8aomUjQId n1TdExPb6SqndSLu7+jvRleTx7H6ieVMjNyIZqPG/7LZeT6gVSWDGpJCsnz425U17H+F gYn0c5QyxpNTCiKusJOYHGvYPKlMztDe0rQgxCOrRBlZo8fbgwed+RKVjfCsQMsW+wkA LQU1mtKBXiI2cqWseqyoXoMjNBR+oOUjKc8bTABoQXgAP3GDsrAYyr+KGpLWPld6oWLg IOLhl3O81LZppBnjJoxq1TwWMBmcTcHCkaXXADFPvLIiqP1kf+rQtmmfjf9+LxpT5GCP eYjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CMI5rYQL; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac54ebfdsi763928485a.678.2024.12.21.16.34.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:34:50 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CMI5rYQL; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 964EA3858424 for ; Sun, 22 Dec 2024 00:34:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 964EA3858424 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=CMI5rYQL X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 93C593858027 for ; Sun, 22 Dec 2024 00:05:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 93C593858027 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 93C593858027 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; cv=none; b=ZnJYpz+ILE6hW/lg6MSROjLmddWpQUnPrV6JlXWKS4zLRuhTv5/tvlkDitP5QLtGbsz88jxlYR7HFeoAGpr18Ez05ZKRlcRKCk8mTdSeQvQUL4kLD04v8j/uzDcCiCZPOmZTLxAwOJdxcOJWLk6ujRj7bnMkMZYTng6/yNFvIpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825931; c=relaxed/simple; bh=KdBIDXTbq9bsn67eRK0ZcNO00AjaH+Jmar1tjPvyy9E=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Y0s21cMVkTxcC/0r7ZdsIokiiZwcyLQU+ttbWbOMnICY5uyRIUEPVpVgqcdcx3yz/sbJZoBeG7paLSyI1udIEtAjFjTSsZScu22YylZEDfK/+6mHzAS9OrLm1dr6pPK7B1/kZgDfNyUY34C7J207ujWfbx46TS6dKrAdj6guDR4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93C593858027 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-216426b0865so28124975ad.0 for ; Sat, 21 Dec 2024 16:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825925; x=1735430725; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x81pIe9TPEVQHB7z1ABuhVi1V7eFPEH0BsguEnIbkUE=; b=CMI5rYQL8s7CEmG7CJ96i/Ab1G3Osu4h9IvLeDHyYNIs5pA59n/S1VFHqcPzjBHmw0 HnCmMVjFmAt68F7S9JuYZrJUcAgoHM81LtS3OMNo7e1bFtqatgvXBF5bmALeq/J2ygID XS02lGBSQqfizin1/ojxcNdVcQGHK9ctSVSSzJkSzWsRzWGpGbj6Q+CLxBJYoHBSbdtH icKNWl3rCWyY/ge4kq4Kmu3ee6wYxm3xp+iZwES2A4kE1iu2wEsi2VBHE4/gumw+Kkrn LdQWHHpLHN73mrbO7eaKGMnd54ns3k4OTnNJ5joxriw9zvLhb3vtNrftRIqaAAlgKK/+ VboQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825925; x=1735430725; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x81pIe9TPEVQHB7z1ABuhVi1V7eFPEH0BsguEnIbkUE=; b=WGkT3nqQVWAAGcIFxPrpsyRhQ2jgoJg5DdLZDZzQ3XKz0kgxXDbwqsTLxKwQS/0QQf NqL2+sXL3RsbzkCrYz/oFH4n0h5bjW3aQ1A3KG9ZR92Z9IFagKAWGLnKmp3DBrqFbZqG aUdLmD/azKUPOgAslU/fiXXSdtHNKKv27Ki3ZNK7GcvGBpYKnB9sD2XLlBUvysjqLsvD Jo36nHO4qyaTytgL0jOob/6iB/mbtRFnq7pTnio1EfX5j56BbMv54OmEpw6wbFaIWPFJ jZb2cIU3NCJqmcuKZCtEafjiutMBNdZqMJI7gbNdPkHqG4rZdxgS+1abwCpGh6U7SBP3 HzLw== X-Gm-Message-State: AOJu0YzLSnuBEV70ZlcLsK/l+q7LxsfuvGMuWYctvLHTUhvR0kyqj6BF GjBKIFeqkW8Fy/SlAnf/78QBT1osPRs5VqUsmVLEYw7uzhJPjvuD X-Gm-Gg: ASbGncvpmouHml0c+/WzVttfydDMKy8CUwda4VdS5uNiMTTiZcDvYep3gSPzIqZ5ybf WmQ21NrLyfZjOaCFMzI+JIpePzpXwga9xuB0H6lzAATqYpapHGq88oHLyQS1rgAs/b8noAX62Yt jTpK37DuoyYUkjmy3p2HCNQAPeeXxXRy68hptdV3vXjZRhjwsKUJHjMrshBcSnChAqBTtcgXT8j kmMfoAIsH18ssfB897ngtNwnlpWdtyylux4HjJbNCTcnocurRl7Gj1hmND+AX561SzqH1E= X-Received: by 2002:a17:902:d48c:b0:216:5b8b:232c with SMTP id d9443c01a7336-219e6f284efmr101924465ad.54.1734825925325; Sat, 21 Dec 2024 16:05:25 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dca0256dsm49059125ad.258.2024.12.21.16.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 58F22C0B44; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 27/39] Check if TEST_CC supports -Wno-restrict before using it Date: Sun, 22 Dec 2024 08:04:50 +0800 Message-ID: <20241222000509.2205895-28-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Check if TEST_CC supports -Wno-restrict before using it to avoid Clang error: error: unknown warning option '-Wno-restrict' [-Werror,-Wunknown-warning-option] Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- configure | 34 ++++++++++++++++++++++++++++++++++ configure.ac | 10 ++++++++++ libio/Makefile | 6 ++++-- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f5e8096099..04b21f0308 100755 --- a/configure +++ b/configure @@ -7968,6 +7968,40 @@ have-test-cc-trampoline = $libc_cv_test_cc_trampolines" +saved_CC="$CC" +CC="$TEST_CC" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -Wno-restrict in testing" >&5 +printf %s "checking -Wno-restrict in testing... " >&6; } +if test ${libc_cv_test_cflags_wno_restrict+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if { ac_try='${CC-cc} -c -Werror -finput-charset=ascii -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + libc_cv_test_cflags_wno_restrict=-Wno-restrict +else case e in #( + e) libc_cv_test_cflags_wno_restrict= + ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cflags_wno_restrict" >&5 +printf "%s\n" "$libc_cv_test_cflags_wno_restrict" >&6; } + +CC="$saved_CC" + + +config_vars="$config_vars +test-config-cflags-wno-restrict = $libc_cv_test_cflags_wno_restrict" + + + saved_CC="$CC" CC="$TEST_CC" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -finput-charset=ascii in testing" >&5 diff --git a/configure.ac b/configure.ac index e331557350..a5445f0b05 100644 --- a/configure.ac +++ b/configure.ac @@ -1580,6 +1580,16 @@ LIBC_TRY_TEST_CC_COMMAND([support for trampolines], LIBC_CONFIG_VAR([have-test-cc-trampoline], [$libc_cv_test_cc_trampolines]) +dnl Check if TEST_CC supports -Wno-restrict. +LIBC_TRY_TEST_CC_OPTION([-Wno-restrict], + [-c -Werror -finput-charset=ascii], + libc_cv_test_cflags_wno_restrict, + [libc_cv_test_cflags_wno_restrict=-Wno-restrict], + [libc_cv_test_cflags_wno_restrict=] +) +LIBC_CONFIG_VAR([test-config-cflags-wno-restrict], + [$libc_cv_test_cflags_wno_restrict]) + dnl Check if TEST_CC supports -finput-charset=ascii. LIBC_TRY_TEST_CC_OPTION([-finput-charset=ascii], [-c -Werror -finput-charset=ascii], diff --git a/libio/Makefile b/libio/Makefile index 4370152964..a879e8c2ba 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -250,8 +250,10 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source) CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\" # These test cases intentionally use overlapping arguments -CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source) -CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source) +CFLAGS-tst-sprintf-ub.c += $(test-config-cflags-wno-restrict) \ + $(no-fortify-source) +CFLAGS-tst-sprintf-chk-ub.c += $(test-config-cflags-wno-restrict) \ + $(no-fortify-source) LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map From patchwork Sun Dec 22 00:04:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852903 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2776623wrq; Sat, 21 Dec 2024 16:44:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVrCHavywLFaGrkWxl05VKgP7Td17zm04wd9+cqkt8w2CJq5YgMOlUG8d+qc0xaaKH7D4p2Yw==@linaro.org X-Google-Smtp-Source: AGHT+IFRGawIFNKOskpNxdHy75AywcOpCSBVXFrjZLtofLmNPxzNo9xcmNd7cJTtEewm+tYZlUd3 X-Received: by 2002:a05:620a:394a:b0:7b6:e20c:1a0e with SMTP id af79cd13be357-7b9ba804d47mr1359950885a.51.1734828249455; Sat, 21 Dec 2024 16:44:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734828249; cv=pass; d=google.com; s=arc-20240605; b=ZqsjnEsQujRRpoS+5UhEzoPqVqgtnq7yYnohIwR3qQO6ia54URePDeb/n/YSyFF8jW hbbSawNSLs/tvp3rZ4KGWp6fw8C31MwTAycrNzzOrSo2a/PN5AFmhmhbWjgWLkjZidLP dUACBMRCUi/UlosknPBtH62hNnX9yLzLQgFqEG5Hb3c5K4X8QCjad8cWf6YdcB/A6/7y W+1vLUlZ0bEc0w5i7ZmMJD3v1RiH9ONQ41VzizDonEb9u2kj6qddWapdfXNjaz3jpAmJ FHflKzbeGu3xudaRKs/oHjhL/jgxxdx0VA4OlqCQkNTLjDHf19vKrEDq8jiKuZSZq8Lh 3ANQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=DfIiNkxVEtz1YHI63P8kuC+tiCY5aQQKXa6yFVmBY9g=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=HkHZYp+QvEmgIYeRXMBgEu8g3S49RYjkfUPzRj3lRoa2wUeqTjSurfCydAXlWM0/CQ oITCHsK2WoEJiOeN1zCLbes1PMdmOFiuA4z1cLr8W/Axfll2X6x7ZLCKbdX57B3V9hmj ebHBJkRdRHMGx9C7qrehXK/ESz548g2lKzkgi9Yh7eFu993r1+GfGQlhyP7ZR1QOoc+k S7+3p37cQ4Fk+MM2uckyM1V9T1FAR77TpJcTJ3xflyfQJqQX3olotFKb56cntkM9Ryyi 9wFnx6fexMmac8RUUdKR+b73aFbNGmK2a1cG/072qSLBI+uShC13CnUPHo5A4X0dTv7H SgSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XHi8E1Dg; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2ab79asi750370085a.97.2024.12.21.16.44.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:44:09 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XHi8E1Dg; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D413385840D for ; Sun, 22 Dec 2024 00:44:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D413385840D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=XHi8E1Dg X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 95160385843F for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95160385843F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 95160385843F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=N48vhP90h09T+YRg/4Xi/lyYlG02dS77s+V8RVWK9E8tnQEQqFD4IDHZBiZmz63Vug40OjscLleqrxPSHcBwog+GGyNMJy7Dy7EiZwR29e1bjEHh2+G+Y2Zqbf9Y5+eNuqbseYPzLZiVSK5LvLUWU0QTMvMXsIiHkicHbPWWzh8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=522axCwMyQCu4yy8uJ6DeFigrKCRqH/44DipZhCOhnQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=v6y3JG5s36Hb7dEiuiTOH5T9swxYM2wlg5sGq3eiIHHmdCXuR2ppKQK0UDX1zkbmATLsyntLh9Z5+nijZ3XFzVcq/7Lk6BNXeVArURR9+oalKLivkvnhSEJvJV9ZoiJviTgiAradOa9evpjEzfPYN8vsAImoKLYZ7F3UMlaQB08= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95160385843F Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2165448243fso33376405ad.1 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DfIiNkxVEtz1YHI63P8kuC+tiCY5aQQKXa6yFVmBY9g=; b=XHi8E1DgtvhvTRxNA8wee0H77zrE4sUy88gUPd8xSAHg6S/4dHaYJ+kY7ryGGnKdzy J/7a2dasrmcGoRtU73UF1UE9OJh7gdX6B56KffibmM1zr9wjXqG6CzM9UkSgG+w3LSpN G1v8+2bI5UWF8+bvQSvwSD5SKnotx6AbivVqBJImL16EEm06HM+p0MAosGOvzH7GnbqJ I/46Q6LGCsGGs7fiL9mxpxp6q8fkFdfxH+8zoa0SgjbrswelyGO4Lvv96e8rsKN9T11c 32ugC86e1KXv4YTR6vAjc+328KKzUmN0S2VCtSOf0iOoYsIB9vCXFnQOk20+C9rClymL a7QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DfIiNkxVEtz1YHI63P8kuC+tiCY5aQQKXa6yFVmBY9g=; b=rwdqSCtm84FieMR9N6lKnEVvDehx+9gAlUOieh+xJ0f/17OzZNB75tBTfqfHiBwfsL bB/rZmeFNsg1w+jXxzr+MgwMXhgohziVliCZQviieMXxzp/r+0mnIckMuQ16m/cal2Cr TvYrKS0tfnuj+tFCWvbGiq2wH2bMVoL6/WTdAxEo0UUwMlUHVWurSLZNCOcwIlhoZUSu GwrABcZ+rS6RNohb2KlXw/tsPGPrXqtz+Zgs5nyeJs/4ciBlwB7FXxvkly4vBxOoQ/nl KOFWnsu6NZ5AOuumo7nTElaCkHPl+R7LU2xtrBt4EMjhVLcz8iShr8fZ+oBE6WWNOIIx tRFQ== X-Gm-Message-State: AOJu0YzHRhwsLd7XJ5w3IUHXYbA62n64cjXbJtrWlKV3hp7Wp9bX3UX0 1hmlhYMj5j6h08/eDUcYnXXd17AG0TGjhs75XRNdh+FXH+Adj1cfoHH9sF8FdWb+OQ== X-Gm-Gg: ASbGnctyTk+klio20Z1RN8AXsO4pXhEp06xLTLpMhRPVUftijRAE+WbEps7xzSVSIN+ 4KgIyaoFHozDQ0KrJ4nHbOAOatoIKIaRtjSP9CO20WOcuS/UactZcfGCAI5+sjskmaMRJK9bsDT +/AqerXsDj+y7JK5oy/zLCRI7T9A2dHtQLClRKoTSjX7nYGFv/To4BRVRyEzaOmeP5TnKx68Ih9 txZLPnyigPPOBeg/JJOmuaEb3yO5VBFgfHGxksqUAyU3o6AhdHELMVP8ifLsvWN76K51gk= X-Received: by 2002:a17:902:ec88:b0:216:57a6:28b5 with SMTP id d9443c01a7336-219e6f3ab09mr105701855ad.56.1734825924285; Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f50dasm48772285ad.182.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 63B3CC0B49; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 28/39] Suppress Clang warning on adding an integer to a string Date: Sun, 22 Dec 2024 08:04:51 +0800 Message-ID: <20241222000509.2205895-29-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Suppress Clang warning on adding an integer to a string, like: tst-iconv-sticky-input-error.c:125:42: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] 125 | expected_output = "ABXY" + skip; | ~~~~~~~^~~~~~ tst-iconv-sticky-input-error.c:125:42: note: use array indexing to silence this warning 125 | expected_output = "ABXY" + skip; | ^ | & [ ] Co-Authored-By: H.J. Lu Reviewed-by: Sam James --- dirent/tst-readdir-long.c | 4 ++++ dirent/tst-rewinddir.c | 4 ++++ iconv/tst-iconv-sticky-input-error.c | 4 ++++ posix/bug-regex24.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/dirent/tst-readdir-long.c b/dirent/tst-readdir-long.c index 409318fa52..2a9db5901d 100644 --- a/dirent/tst-readdir-long.c +++ b/dirent/tst-readdir-long.c @@ -26,6 +26,7 @@ #include #include #include +#include /* If positive, at this length an EMSGSIZE error is injected. */ static _Atomic int inject_error_at_length; @@ -59,7 +60,10 @@ add_directory_entry (struct support_fuse_dirstream *d, uint64_t offset) if (offset <= 1) { type = DT_DIR; + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); name = ".." + !offset; /* "." or "..". */ + DIAG_POP_NEEDS_COMMENT_CLANG; ino = 1; } else if (length == 1000) diff --git a/dirent/tst-rewinddir.c b/dirent/tst-rewinddir.c index 1479766ebe..891c7e7e48 100644 --- a/dirent/tst-rewinddir.c +++ b/dirent/tst-rewinddir.c @@ -24,17 +24,21 @@ #include #include #include +#include /* Return the file name at the indicated directory offset. */ static char * name_at_offset (unsigned int offset) { + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); if (offset <= 1) return xstrdup (".." + !offset); /* "." or "..". */ else /* Pad the name with a lot of zeros, so that the dirent buffer gets filled more quickly. */ return xasprintf ("file%0240u", offset); + DIAG_POP_NEEDS_COMMENT_CLANG; } /* This many directory entries, including "." and "..". */ diff --git a/iconv/tst-iconv-sticky-input-error.c b/iconv/tst-iconv-sticky-input-error.c index 34a245f185..68698646ae 100644 --- a/iconv/tst-iconv-sticky-input-error.c +++ b/iconv/tst-iconv-sticky-input-error.c @@ -26,6 +26,7 @@ #include #include #include +#include /* FROM is the input character set, TO the output character set. If IGNORE is true, the iconv descriptor is set up in the same way as @@ -121,12 +122,15 @@ do_test (void) for (int skip = 0; skip < 3; ++skip) { const char *expected_output; + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); if (do_ignore || strstr (charsets[to_idx], "//IGNORE") != NULL) expected_output = "ABXY" + skip; else expected_output = "AB" + skip; one_direction (charsets[from_idx], charsets[to_idx], do_ignore, "AB\xffXY" + skip, expected_output, limit); + DIAG_POP_NEEDS_COMMENT_CLANG; } return 0; diff --git a/posix/bug-regex24.c b/posix/bug-regex24.c index 97c5c3508a..72f3d76afe 100644 --- a/posix/bug-regex24.c +++ b/posix/bug-regex24.c @@ -1,6 +1,7 @@ #include #include #include +#include #define str "civic" @@ -45,11 +46,14 @@ do_test (void) { int len = m[i].rm_eo - m[i].rm_so; + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wstring-plus-int"); printf ("m[%d] = \"%.*s\"\n", i, len, str + m[i].rm_so); if (strlen (expected[i]) != len || memcmp (expected[i], str + m[i].rm_so, len) != 0) result = 1; + DIAG_POP_NEEDS_COMMENT_CLANG; } return result; From patchwork Sun Dec 22 00:04:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852886 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2769420wrq; Sat, 21 Dec 2024 16:13:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVfIi6B8a5eu+tNP/zx7ocqMXJPpeDKeKq24sDkcciFCmMARzU9RUz7jg9Syy9IZMwwok6Z9A==@linaro.org X-Google-Smtp-Source: AGHT+IE6UAG1kkx47xikYWZLl5X5KsADcb+jzAmOMzd6oRRup0v8xL4Qvc52zuIeQ3t2GcR3b8Yt X-Received: by 2002:a05:6214:2621:b0:6d8:b5dd:7699 with SMTP id 6a1803df08f44-6dd2360e105mr104288206d6.17.1734826436566; Sat, 21 Dec 2024 16:13:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826436; cv=pass; d=google.com; s=arc-20240605; b=BgRi1WRmJ2ZYwRlxo86vASHaeHh0N73XcVh69Z34Hm6cUKLs3IWroZ7IuJmEnSlWf/ ib68XRED+WAhJ6p2bX4tE20AVqCx7R1WzZCvzlVBU8FXDEo0yKMmuS96o+dKf5tKJ8dk CWHB1tTGo1hhaIK+OU2mXV7i+UXEiTIsqLowxNdHLVdon1pl4Ugr11Fh11tsZRjOoJhq 1R1CTAiEfUTtFTi1DLxPGDLf3UTEZn+DShdEhytHSPPbEJWIqXWHjK0MoMr+MDoidlVK nmtbwO58EcHonyQqe+hwHIPzZZpfwInNhzaLq+9hcbX5h/o5jMqFWYmCG5SeHcTtR2SH Eksg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=ceXLlC6ui3fEQNSUELVE6ds4H551ZAuPhCCHkcr1sFI=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=MHPyUpn2DZ+RJUH+eR0D14QjuxHYVzZnFp17eh3MdLRNIzFZ4q+sAWz5Ba9CvRoxYe WQT4HIq+ClAR0kYsMvPPqWYP+cLY+ledD/6SDcQCwCZDBZW15Tc9CWrm9phPK1SPlRDU jDL0L/fJUnRRg/5TvzSP8UGDQXETaD2aVB7/lDksYFEWXV4LUvofGbgPr8kXWWubndqs k6zYMtlZ06s74ZQQXPsdaR974gOjumv6RfPEeAz5iMQarXuVngtgp9Z9gH2FQy0RJOQM p9diKNaKZ4KKtEQ8mf1BIYQmlB49PG4IV14bYFhYbecDybtkuMT9DGrEdW3J/KpDTVA5 qqCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jYxFWxoh; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd18135f47si75987096d6.120.2024.12.21.16.13.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:13:56 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jYxFWxoh; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 335993858039 for ; Sun, 22 Dec 2024 00:13:56 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 88FF23858039 for ; Sun, 22 Dec 2024 00:05:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 88FF23858039 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 88FF23858039 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825934; cv=none; b=m7syJOxjwlmtwmTaQSf+Gi2ghQ16IIgy1E5ZAeXNOcBycNzoH43+x46d5eTPn/+cT04IiAYgQu5qENtp685sXg/cdAwdifY9Luk9o+7CkZwYBmcUbHFVJztbkEUGrCwqT5bdx0G7K4f0xdC3lML7pi5Hx6rxevUz0VlezTUjpks= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825934; c=relaxed/simple; bh=sW72+8GKrgN2BGscpBwq0ZA/pKZ0rF+HMrpbuD4ZD7w=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TJwN27q3yCTLRx5rxQpzU4WIIdzsThDfBS99Jqxu4C9w0fsn8Ojh5wKnCmGUP8bIoo9z9YT3WltTAKBbgIKXDQn31Kj88mOfSNTK9o4Bx50cnr4AifQwMFA5O5SBQjJVwepjcxmnOrPpHfXr4yMwzN1OxESB9hyO80eJWCuyTyk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-216395e151bso20377695ad.0 for ; Sat, 21 Dec 2024 16:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825927; x=1735430727; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ceXLlC6ui3fEQNSUELVE6ds4H551ZAuPhCCHkcr1sFI=; b=jYxFWxohyVGAf4LGh9tiZ/NwaWcYZIrLKMgNaCmjAv/yvMOecL4aPvseuQzRnyAr8W q0O1NwxIAkeOfXMK4g1jkVk5/KgiWnhqf2KUgyT65za0ezuyUuVQiNM0smrjzLm4ZmVa yvDo2Ln6FgQZWHMP5yrCenuVAKdOeGez5fEdEthdOtuZW60mFwpMK6SjBMb5af1NdcLr XEQMb5DhmlKxWqDqljmuiC4K8OEefcDH6MGEZ+g44HZ0fHA03ryNeXXyp7z8kbJ7l/Gs 75bv2f9cRgGtd2hSX375a//j6jscPln6UZZUq0E8veXEii8LuSeKOI4oofyEV9NNuWJs rFOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825927; x=1735430727; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ceXLlC6ui3fEQNSUELVE6ds4H551ZAuPhCCHkcr1sFI=; b=jR/I2soQUhpGhOPT8r2yPHsj11H/ocsDDYoZNY1lG9RB6310HTAmGwMxIhXXbi+i7H tN4X/LwgV2jad/R0mvNJSVz3YXrpm6iJRvzHjebNUBtS/sONav4//PyLI82XWrNOxrEq FunA84nWbDj/DTSrAkqRPHDJrRIZwbkzVRwnjYoS68PyK9PDneF1EAUycFR5bjjaiTSZ aZsohXV8IPudENg6Vmwhj2rTtmIKVDXfo7hsFFTFsSc17VKGRnmtgcVPLaUmFwc35ci6 ujVSCguLdnii/FA+jvrqIy81RCXd1Se83d1kmNE2LKG7dg7D6aEVtwx8Ca4Afx/sb7DF YrcQ== X-Gm-Message-State: AOJu0YxkjPpImdwN2MQvo1aK3NBJGLpabWzxb2K1TDwje7j8aBN5TSl2 UGrhUVXeFuhCX77W507RdWq74ZGqBXr+YsmnmE7UWqjxDarqhiKSsu8/1bCs52/2dg== X-Gm-Gg: ASbGnctOeVK2fGjCg1ZYfQSEUlfJoqC93zAZCnhnnZgukYzlLiz3ofcY4mbiezf9hgb +sAYqVyQ3diZZx0gcikLVbFzZuX2TzKZE/kUL8Utj1ZuA1bnzZM4pXO/nZDfrTVX5KfoNcvA+rp uNOfhYVPbhiq6mxjprnu00B9OlUUC8WyixQ9YmghalJrwpiMlfMiwmsRMqVCZaRBmUpnCNyQbmg kTIzpE0ptE4gO6NVZovSCOxeyaN0h7i2K2urnCHympyHCTZ5cF8tDAlc4LZhKC9QD5KvAE= X-Received: by 2002:a17:902:e883:b0:215:742e:5cff with SMTP id d9443c01a7336-219e6cfc163mr119671605ad.16.1734825926654; Sat, 21 Dec 2024 16:05:26 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc96ea84sm49073255ad.76.2024.12.21.16.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:25 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 6E76BC0B52; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 29/39] math: Fix clang warnings for math/test-tgmath-ret.c Date: Sun, 22 Dec 2024 08:04:52 +0800 Message-ID: <20241222000509.2205895-30-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang warns that since the global variables are only used to function calls (without being actually used), there are not needed and will not be emitted. Reviewed-by: Sam James --- math/test-tgmath-ret.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/math/test-tgmath-ret.c b/math/test-tgmath-ret.c index 36dc132e4f..71f36d39fa 100644 --- a/math/test-tgmath-ret.c +++ b/math/test-tgmath-ret.c @@ -21,13 +21,19 @@ #include #include #include +#include +/* clang warns the global variables are not needed and will not be emitted. + However there are used on the CHECK_RET_* macros. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wunneeded-internal-declaration"); static float fx; static double dx; static long double lx; static int rm = FP_INT_UPWARD; static unsigned int width = 64; static int errors = 0; +DIAG_POP_NEEDS_COMMENT_CLANG; static void our_error (const char *c) From patchwork Sun Dec 22 00:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852888 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2769673wrq; Sat, 21 Dec 2024 16:14:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmRM8jHRPpQGyauQ5pq2ISouyCPlhZmxEwWb2zWVaLiUpMSaQB0We31pVSIgJobhLRzSiq5w==@linaro.org X-Google-Smtp-Source: AGHT+IEj/THtGB1y9Ae1IbrSO0TNVM+u5oHYMrjJPOblNyenWcnEOEEhjVtt02DRxEfiazlrLoiw X-Received: by 2002:a05:620a:a106:b0:7b6:f113:b658 with SMTP id af79cd13be357-7b9ba6fdb17mr1300449485a.12.1734826491691; Sat, 21 Dec 2024 16:14:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826491; cv=pass; d=google.com; s=arc-20240605; b=i2l/ZpDQmftz5NBt00YmAfsjs7xAZEG9bfpOPkcfdrP6jdLmNVSehIfA05LDAEngPZ O5g93rVOsb5K28md5Z+Gke3UaLk3sm7GgYoS93PYuf9ddyCpFn/18JA2s7t+mUZCMPmi 8jm+z7W9j4ABTFRkywEuRSKNq+rY/gzrdeVgkZbfR4XkPycE6FxTsuLglWi3A9JdiQIw 19uehT/AHg9wjbGPVClLjcYRgKPf1PV6qkctrP+ojL6vVmkZdRADspKyyamaCPn8DFQh xy0C735w2kUWOpCYMmRqCbcjtSfLwcWboWoIjUVVS3dhN9JSCRpkmvaVwMGoOaRK8Fwc p3iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=5st+7vEeig88DMTTNw5mSRK3hv6uLu+7RI00YPB+aVA=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=UHm2waSwlnjonbsmRAUEgZVtqRTQBEzvEO8m2mOtDg58QanwnDLgdZ7ugLWPZLXOC0 nhHUPty2y54Cx2Q5zuxSYbay9U6c7nHl/S5tu9KheG4//p98J1zfa7p+IGBjPp2Uon/S 4QExFq66gHBDoDQM20WsPtIscY7SsGtX+pDddZSdHJBGmCdSp8j+uW1S+CwZQZMGOzeR 52Ysagsl3k0ZiyzulFvgSV8IIYiI7UazpeTLPLRcVTQD6x8EdcRIeUPAaPCmYKgZo+sr YH9oFecfBlvu2NxPm0idAyD+bf4O8K5EAjADTy0W/fCEiI/jzxkbsmtIO4feGlZn8FI8 Bd7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Blz9sVWq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4ce56csi768389285a.401.2024.12.21.16.14.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:14:51 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Blz9sVWq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47C883857C6D for ; Sun, 22 Dec 2024 00:14:51 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 906763858282 for ; Sun, 22 Dec 2024 00:05:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 906763858282 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 906763858282 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::434 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825925; cv=none; b=iOreKef+/J8hopV2cmGYb76BM+7Wqr2pv4rNNBqXvnikcTn68qgR4cq9bRhdCSme9sQBZmDnFMtGb6VUrxvYCWi5MN1LOOVSwFtswxSfPUCpgUx/aW6nDV1YRDCgWCjFf2+AdA5M0DJ2Hdb6WQFllHPv/BmBcBW46BA9V9fHdyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825925; c=relaxed/simple; bh=33KOswiBQHNkqRvsryftJw+Tg7Zk87aVaUTCyFDNkl8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=p797TRF+pwdjQXvlSKFt+m8166f4Fdgz3xUVZctVy27vJV9l+O0u/BgG/lfJngMtyJ+E/zHFH45tYag+ggtngCzTgyBBgbfExUUa+ONTWBp5Bfxyymj1cdI0h71wE7FBo9rF1Lsw9H1bXPH+axsdYZF9srFzQIA7GI+zjwCwZTg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-725c86bbae7so2766201b3a.3 for ; Sat, 21 Dec 2024 16:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825922; x=1735430722; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5st+7vEeig88DMTTNw5mSRK3hv6uLu+7RI00YPB+aVA=; b=Blz9sVWqAKrbLAfBkxZg0S6Wt7SNRm1iMks5oJSrW9g9GDsFPh8el8KftcpAnNcNW4 FyWkZStX7a8Abb4E0zvvmDyztwX8RAOul2db5ghnGOAQzd3QorUTklwzRp2LXm9S13Zj xa07bcZXOgQ8SbftLhbUXK4jN1gCBwCCIEi1+CEabVFOvhdBq7cMjs4qWOA8lLheNog+ sr5TivJhO6tO+JxwgPZEYfBCDT33CYkQqfKF29iVBImBEpfy4A2jM9UhAoxEBy9pZqB1 IDINBIoPOpONg07gMz2FeXYVmooM0m64k5b/KX2vOiGI0H+G2AxGegiW+U2MUd+af39I uaaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825922; x=1735430722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5st+7vEeig88DMTTNw5mSRK3hv6uLu+7RI00YPB+aVA=; b=k37I4oB7wOyJIZphzML0rtdAjrxB5fGOUCt8BdyHOgZjrshcTByVYgRejVj+ZacmWd OIjYYA8KzNUbSYfp4LewEJWPGzrJLcJ4PAhJ8YYqCcuIcWxitVL5mu4B37/bbpz/jxlM oB0BsXQ3Mf02UHbzfCDF8Bsmgu7aVtIb21HOl/vBbCwvRvaMQF9rjmFGLb/9cCiShviS HDVsLYvd7SVYPz0usIXPb6j6b0z0cZdRPzwQLN6yrbqqT/Pxa/1pjP8XHamKF+FO2FEG 8XSvg+TyWMrEVwW+XgfrYKgDRPG3naTH8QOfDpnQjACJ5NsYsuTKhVeZWyS76HqzG9za f38Q== X-Gm-Message-State: AOJu0YzcvT+09gdoEyI5FBFloyb9IVBMLDAVKMsVpArCvvDEeMt656VX 2tKQZqCtTWLmF/+u3mrKCH76uH7YuS2bkBW9k1mehiwoNt1xLAfy X-Gm-Gg: ASbGncvpPYq2GVTEV+AXNsMRs3jjttN3v2/wNtEtPn2zD+XuqrkT/EJk1mxnFWS82l5 T1yesoGH1aqOGloHjM8DgQejHbhlEiUt4mr0ezzSMITz+YG+Vg2ri5Vjgg4FBU7wE4Ik7Bxylqa 536Ikj9m4xO472q/6VBHZjJkpRQRP65UAzQbksBzkbvUN32LF4NkctB7bgXWwvIv4pUYnovywd/ Zcj3xvfMMDzWQj9+AN25+Byuok00bAPQdoMfsBIClcry3Bale7+Xrok7r93nRhcigEIU/E= X-Received: by 2002:a05:6a00:35c9:b0:71e:6c3f:2fb6 with SMTP id d2e1a72fcca58-72abde65a60mr14290260b3a.8.1734825922417; Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8dee97sm5435735b3a.126.2024.12.21.16.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 79268C0B53; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 30/39] stdio: Disable clang warning on scanf13 test Date: Sun, 22 Dec 2024 08:04:53 +0800 Message-ID: <20241222000509.2205895-31-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Reviewed-by: Sam James --- stdio-common/scanf13.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stdio-common/scanf13.c b/stdio-common/scanf13.c index 60aa62a26f..6f3ddfa1e0 100644 --- a/stdio-common/scanf13.c +++ b/stdio-common/scanf13.c @@ -3,6 +3,7 @@ #include #include #include +#include int main (void) @@ -20,6 +21,11 @@ main (void) } while (0) setlocale (LC_ALL, "de_DE.UTF-8"); + /* TODO: explain why clang need these. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); if (sscanf ("A \xc3\x84-\t\t\xc3\x84-abcdefbcd\t\xc3\x84-B", "A%ms%10ms%4m[bcd]%4mcB", &sp1, &sp2, &sp3, &sp4) != 4) FAIL (); @@ -57,6 +63,7 @@ main (void) FAIL (); free (lsp4); } + DIAG_POP_NEEDS_COMMENT_CLANG; memset (buf, '/', sizeof (buf)); buf[0] = '\t'; @@ -86,6 +93,9 @@ main (void) FAIL (); free (sp2); } + /* TODO: explain why clang need these. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); if (sscanf (buf, "%2048ms%mc", &sp3, &sp4) != 2) FAIL (); else @@ -126,6 +136,7 @@ main (void) FAIL (); free (sp4); } + DIAG_POP_NEEDS_COMMENT_CLANG; if (sscanf (buf, "%mS%mC", &lsp1, &lsp2) != 2) FAIL (); else @@ -142,6 +153,9 @@ main (void) FAIL (); free (lsp2); } + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-invalid-specifier"); + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat-extra-args"); if (sscanf (buf, "%2048mls%mlc", &lsp3, &lsp4) != 2) FAIL (); else @@ -182,6 +196,7 @@ main (void) FAIL (); free (lsp4); } + DIAG_POP_NEEDS_COMMENT_CLANG; return result; } From patchwork Sun Dec 22 00:04:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852898 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2774165wrq; Sat, 21 Dec 2024 16:33:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfE8oX7fAaGs+e0jlSDjdwBnW4I/LFluRVsOhBwfwPTJp8rqSmKd510CkDN/nCCP7j8t5OWg==@linaro.org X-Google-Smtp-Source: AGHT+IE5vrY+nQ2SYopzm08WnknFVhGPMAXu7ltLYP1XKjvbIROu+SR3KNsP3PvkOIzXVDXEfrcC X-Received: by 2002:a05:620a:2449:b0:7b6:fdb9:1be6 with SMTP id af79cd13be357-7b9ba7a582bmr1108059085a.29.1734827612980; Sat, 21 Dec 2024 16:33:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827612; cv=pass; d=google.com; s=arc-20240605; b=ge6I4ZoNOlL1s0OGd0RtGzcJII7gv8RGkc/7vwftzEIkg4QlLyJ6eum3AjPbG0OpHw GamAQoTPNSgKjhlEkxbzx+E+WQBvW0I5pbbWrNUAyadZL4wTkX0KxviRsFOzFsPNzPhG L6nH9fZlqEDoZpLZHa+1HZ1kMHqaDRq8aMluZkU0Q7fVh8oFDzjUUh8NN3C8jNXdYUrj SuzNY5WZSbEZ+Bi1++4xBhCL4YdA16Ghih3jvVuT0lGenEzmj4OyXp36LnnxK3lG187v Fg6hYaATYnUDe9AqePQ+5WF6vVftkcbj16xytock11/2IgoqnB53/LvbJBq/21eucFk7 KgDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=ax5OnTZHzyQf8MhwgFJtihzpupsr1aJ7N0NIw6nrVOY=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=Iep47Pvez8nY7U9dcfkKEeg9qBKi6+pC0vImklQY5+mSLz1//cBZ70ff9sL/w+MEWG HgQYYY/QqATExpoHBWZ6n4ZBbdtb2cPMc8s2H73CXkv7OSr8fhd8rrDGXXu+6av9I32d EXQkuFQydPLt5TiOixX6INaYQ5gKFWiwg4plJKNplxt3kUnAYYNhHGiw5vsFCHLKdwsS SQHieEVC7bHJ6mF0fu3Qip2qHhelLv4i0aYwelNo0euO8BORjkpOt9PvNxdbsJHLPp++ ANKiOgiyHQzpCLSdQcbm+bxF1OEPudNyFpBHstGWNzggbyVLZjFXxb4GDd43WmwUGpO5 XuKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="M/Cc813O"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2ab70bsi866053485a.31.2024.12.21.16.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:33:32 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="M/Cc813O"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EAD433858D3C for ; Sun, 22 Dec 2024 00:33:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAD433858D3C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=M/Cc813O X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 8FBC73858280 for ; Sun, 22 Dec 2024 00:05:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FBC73858280 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8FBC73858280 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825927; cv=none; b=TxlPLQN43fcu/QT3Blo+DUXSGw99hnTwM17X3DZ9vSm2y6c8szbyro7W2FDJDB/65UlUXwPq3rdCfWrw8c4h6LAWhTbH+h2ffBXaaKvGrcjtIOtw8mz/Fim7oDURrYDNsn9y32cYWgpJLfFom+yTNInwb0QfnpAPMMucNBNBtW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825927; c=relaxed/simple; bh=krU9AMZB8ifNaY9kNWRxKN0nLuvnmUCaCFM0MUYCM+U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=O6H6vuwAkub+Rm8kCCN84O1Sdo9/bHC/IAIYT47PEJBQpefjT3H5qzzQ+d+5RbKiP417nUZtgF5S6+9kzM1gunfTeNFNBehTL62Y1WUU7yr1GVuvvuHDUeXh539XaSSpJnAZZvW1hYtFNvWat+xNp7Vbb9uXIlg6DZJwCCNP/+Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-725dac69699so2803034b3a.0 for ; Sat, 21 Dec 2024 16:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825923; x=1735430723; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ax5OnTZHzyQf8MhwgFJtihzpupsr1aJ7N0NIw6nrVOY=; b=M/Cc813OJaSJtaeduLp45N8+6iK1dR/kfy4yHzLovE2pZOIIKcB1VFX1EaZFKZrW1G gHrZ6fx09RLKdy/E+jR4dIquq++JrRe509mipUz1fr6v/WNyY8f3BJIGhtLWbJSbWBrM XKSu2Iz32exMA0qDmBOZ7JZiEtT3YD7IQVLcx6F9Ci5SWEMeGrzYyu/USD1oQ6q0xAo9 A9DnlhBzV0HwtIScXaK7TKlnhVrtSmWZG08U3ZkPynfM1eBqcZFgvPh24D6zcf2z84Vg EBYXzGjIzbSg82U3EXoIvt9QqD02L2TC6gkgJfta3rkicD6J9J0oLZd2FTxjDQoodQuA VrUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825923; x=1735430723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ax5OnTZHzyQf8MhwgFJtihzpupsr1aJ7N0NIw6nrVOY=; b=ficMFCPkUPeOLdxbUxnfrX8ysmeWsipVwFI9l4dccgzXfR3BBKcahsBOYu6YMOUQ1d cIO+LIgt/VihMqZce7ajcL9gDbMYOfO0bCDb8tlvMt/eEM4lQJGqvFFSsafmtJHJ5AuL A5ILw8WmX6/MDd/RJZ+BgZolRzbZjg4waW61ufmjMqbZvE3QA52WF825whTqNECBPM89 drV6SqsSh0qdm1vueQk0GCyGI1VOkY30MJkuhZF7ZWONJCT9mksOZ+SHF6YvAgnFSYCx BdtqVj/mnvTXguwhCAdnN6/yYFIeFeiJ1bkLMAYj6b1lw+BOXOv4JiUPxFG+hTJhZhih fVsA== X-Gm-Message-State: AOJu0Yxd+L5DQ2bcwOuYjrwq0f1TSnoN4noFoeit8qYaNq0EIBN9RrbG jes3dLcBN9wKVDQO7zu1Cr/tYf8zuDUwna2fmR8J4oA1G09QRfeC X-Gm-Gg: ASbGncuNL2W1fPysp5B7KUe5Mt6OkDZbX3FJ8T81OHfBE3HHF4VJ/KS3UBQ/CE1GhhD cXMqMz8VdRJ5elkJEm1Ttbk+71390t2zAa4/+O2DdgyY6uXXOTJhKzwtZxY3jXP+7r+lQl4Ourj LNDqgvKFHQiDnmMskcJMslrH5tQHzl/p9J3e1tEDwTHt8U0/LYRyK7W4X1DvVbzibO55HpbhtZn XI9M8jbNHkQpqMDIhNOTJeemOKLCUHSLcpYA+2GDfwfjEWqUqBbmhBnDyK222UVLKrtQZI= X-Received: by 2002:a05:6a20:9f96:b0:1e0:dd4a:46b3 with SMTP id adf61e73a8af0-1e5e0461e0dmr12613227637.16.1734825922706; Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8daf1bsm5269819b3a.118.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 83BFBC0BA4; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 31/39] string: Suppress clang -Wfortify-source warning on tester.c Date: Sun, 22 Dec 2024 08:04:54 +0800 Message-ID: <20241222000509.2205895-32-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Suppress clang -Wfortify-source warnings on tester.c, like: tester.c:385:10: error: 'strncat' size argument is too large; destination buffer has size 50, but size argument is 99 [-Werror,-Wfortify-source] 385 | check (strncat (one, "lmn", 99) == one, 1); /* Returned value. */ Reviewed-by: Sam James --- string/tester.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/string/tester.c b/string/tester.c index 3e3660777e..aa880be46c 100644 --- a/string/tester.c +++ b/string/tester.c @@ -391,11 +391,19 @@ test_strncat (void) mechanism. */ it = "strncat"; (void) strcpy (one, "ijk"); + /* clang complains that size argument is too large for the destination + buffer. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); check (strncat (one, "lmn", 99) == one, 1); /* Returned value. */ + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "ijklmn", 2); /* Basic test. */ (void) strcpy (one, "x"); + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); (void) strncat (one, "yz", 99); + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "xyz", 3); /* Writeover. */ equal (one+4, "mn", 4); /* Wrote too much? */ @@ -408,6 +416,7 @@ test_strncat (void) GCC 7 or newer. */ #if __GNUC_PREREQ (7, 0) (void) strncat (one, two, 99); + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "ghef", 5); /* Basic test encore. */ #else equal (one, "gh", 2); @@ -415,13 +424,22 @@ test_strncat (void) equal (two, "ef", 6); /* Stomped on source? */ (void) strcpy (one, ""); + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); (void) strncat (one, "", 99); + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "", 7); /* Boundary conditions. */ (void) strcpy (one, "ab"); + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); (void) strncat (one, "", 99); + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "ab", 8); (void) strcpy (one, ""); + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); (void) strncat (one, "cd", 99); + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "cd", 9); (void) strcpy (one, "ab"); @@ -434,7 +452,10 @@ test_strncat (void) (void) strncat (one, "gh", 2); equal (one, "abcdgh", 12); /* Count and length equal. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wfortify-source"); (void) strncat (one, "ij", (size_t)-1); /* set sign bit in count */ + DIAG_POP_NEEDS_COMMENT_CLANG; equal (one, "abcdghij", 13); int ntest = 14; @@ -1438,7 +1459,12 @@ test_bzero (void) equal(one+4, "ef", 3); (void) strcpy(one, "abcdef"); + + DIAG_PUSH_NEEDS_COMMENT_CLANG; + /* clang complains about the 0 size argument for bzero. */ + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wsuspicious-bzero"); bzero(one+2, 0); + DIAG_POP_NEEDS_COMMENT_CLANG equal(one, "abcdef", 4); /* Zero-length copy. */ } From patchwork Sun Dec 22 00:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852897 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2773640wrq; Sat, 21 Dec 2024 16:31:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdIjKaeclLr6i3TT6PJsdEplFI2bOSuKbY03GlZi/taKyJIPY6QyeDL1bkV72ukaKFEOg/JQ==@linaro.org X-Google-Smtp-Source: AGHT+IEA6p6cnc9V1s/4cHfXsXZ+7skDBhOuf8rOAN44rEEPdKj3GKBTkfLO0Cn95XVI/4g46yJB X-Received: by 2002:a05:6214:4199:b0:6d8:8aa6:ef27 with SMTP id 6a1803df08f44-6dd233978bfmr157829486d6.38.1734827486973; Sat, 21 Dec 2024 16:31:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827486; cv=pass; d=google.com; s=arc-20240605; b=B98DR2qj8OGUDt+zeCgNIUbqroPJY0D12KHS998VPesaExObROR7fO6WOU/xMjJfQZ RHI/ja1Oee6UJvFOjsgpBlU9HnE/kP3h6pTB5Ua9PaxG2lbRChyRlcPjXOnTFNHNX7J7 3uzZOQsvc2iGJOud5I9WDb5i9tf28J36UqKNIRVWZ8iL+2mJAHPo2KBfCBcXoVhUBKDS Kg8mxADu7DVFzF8mzIR5ShTwu3e94lWV1YOxmf6gqJw7z/QJgVV3Ms8wRnhU81sBTxoh i/LvyJ1JJeakEnxRREGYypIcGk0p/fwo75zErHwpj61MSSc+UH4f5TpwNsKxv77/6PXS LnLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=QNuJHwG27hw+unioJOZ1NBrPtPRH4HhSYNWK3Maje9qW1KTOxkYyUJxQwRegJ2BPj9 4W7hvLKrjFTNOavFeYgRFmNY4yxIsNvL8ZXiFXN5curG1Pz9RdFb5y4eDVS9JxRoEelI z/G0bM/MmLKCwFcVVaQ02T8akhHCu5meCmiok1RuzRS78rap/h3B5co63IOs+Q4Hr0xn xA9lWBteSxMZ92C5HhUsoyIDKIBBFbxEHkovTtav/s8NSKJU1ROXi+EGL91rBpChIUfO GzmACb/xwpgh/4n0DTGfy5dXQGpIP7M0qrZaNRhRrWP3NNWsqM4xmhqS9THXMZjoh30T prgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SUGiALcV; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1813737esi83281266d6.151.2024.12.21.16.31.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SUGiALcV; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 662573858D3C for ; Sun, 22 Dec 2024 00:31:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 662573858D3C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=SUGiALcV X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id B5526385828E for ; Sun, 22 Dec 2024 00:05:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5526385828E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5526385828E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825940; cv=none; b=S5GzRVk1u5hkz4ww5QV+octnYy/poYoPZ5E3umxt+sTDd2bSsTRtF4PNZT6F69GatsA2TiOXhF2hzDi9fniCVMvo7McJDN3bUMARCevIETbF7jw7VzxicVSB4OXoQVSW0NLjKFHJI12zW8o12u54HVJ9PwcFD2Fw/HKZsMNdxus= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825940; c=relaxed/simple; bh=qNo/QzloqW523ao0DpEsVCb6SrQYOU4s93IwSkolwYc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Rq1LHJovGgw2qwf5ZUbWEzE/2UIOsvo1P9S9HlHquLgGcCMQ2i3JnP2ryffClSddZMvSeY+/7raJ09+XgZXp61wyx6R6RpiJDJ9OAScTwV3LUwPT/TWflVN+vwg1SA1Aw6lKxVb7/kG5TW86MnosUyHVD0+5IE0BvM6FLGUULy8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7fbd9be84bdso3108386a12.1 for ; Sat, 21 Dec 2024 16:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825928; x=1735430728; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; b=SUGiALcV3Nw0bTkKphVbJmV3GIWU6bXqsu1CEmGMsNJxOR/6F2XVk4EFI8Rs1HP9Ya 20KeKxtq2SuvkcmnasnV4FgfYyA8ksJ7UvOl1egVzuYEPdi+xA5cc3xUvbsakMVPQE5h KWmLJnxbwwhBVAX6YZ+PnS+F4J1ZLIBVdHEFX1FtFg+BPDmHt9KA5DeMJnnikQiqeP2X vYgyLa2VSKOWZHNAvQsnkwDm8K0JZmXnyqSOU8/s+AwGbEjuPi3EnQKgu80o83mKBnyj z64oTQlkL2dsvGbXotRpKzofitlBIj6gxAm/obtbjhqrltGEzxutGUWtxWQecNFo2TSN h+rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825928; x=1735430728; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hg8Xoew/H1cpg0+4/B8CQEDXI+xaWCzVgJs3xLUm+3Q=; b=iu3bJHs45dh5n+Mqmg3kAocTxj8knE0Qkx1NXZksU8Q8s5fpW50szPUq2vgLmkkR7w ZvLuCSVI5F/rAwaB8HLzYJjpSugjGp0mxgDNb1fwZNb4avBWpo3L4Kj84lOU/PH1fO2O 684esECNuAOFwYAmsq+257uBA5SHWzyUdXOs0c63ILoiC/E0X3j5bWKaCbqOycCiXPx0 vSpmA/QriDb442dSKeeBqh7GnC9EOUi6ktqM471sp/KoZBol+/JQVqw5gToJoS1qyr+A XJ5aZQ/8sMwww5PEvqLxKBKIahkO++4nPUtRKoVICQ0awFuJ7Z/Ct8naHOYJGY5welX4 8qYg== X-Gm-Message-State: AOJu0YzzKu7hhrBg/g5DEy+H/xQWp6EvBIgbCEWDVSMp3ee+3ot/GAZN gx3SS3REkxIzo3AXEauo9Fr1gH9lwgHpf/k5koLUMoa0MzpkcXW6 X-Gm-Gg: ASbGncuxw8wmfE70euGTtAM8i6bB/N7+QGaGwOrl74g+BXE8y+XDUxbp9umOjFZ2apx 3MruY7FrSyVipy1mgcveU/I1PvG3CvmVAmLULbFoyW48yUMAc0N0cahpQdtASktpJnOAMh0xLA+ egXkOEnCdKSSQBIbd1ki0xwjpFStUE/xYpdTd7zwruEnlDo4wsU8+cQyCL0phUrvnInuSCmE2oh nDK/s/6gLDy3jsQdIKo9/sGZlS5RJnl+zE39Qh2ggvPEN/Agfb6oebQo111jH1h81FdXlI= X-Received: by 2002:a17:90b:50c3:b0:2ea:77d9:6345 with SMTP id 98e67ed59e1d1-2f452e4cfb2mr10371981a91.22.1734825927777; Sat, 21 Dec 2024 16:05:27 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc962cddsm49217055ad.48.2024.12.21.16.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:26 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 8E862C0BA5; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 32/39] stdio: Fix clang warnings on tests Date: Sun, 22 Dec 2024 08:04:55 +0800 Message-ID: <20241222000509.2205895-33-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella clang does not support 'I' specifier and handles it as a 'length modifier'. Reviewed-by: Sam James --- stdio-common/tst-scanf-to_inpunct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdio-common/tst-scanf-to_inpunct.c b/stdio-common/tst-scanf-to_inpunct.c index 6fc038f476..fab1a232b9 100644 --- a/stdio-common/tst-scanf-to_inpunct.c +++ b/stdio-common/tst-scanf-to_inpunct.c @@ -18,6 +18,7 @@ . */ #include +#include #include #include #include @@ -68,7 +69,11 @@ do_test (void) for (int i = 0; i < array_length (inputs); i++) { int n; + /* clang does not support 'I' specifier. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wformat"); sscanf (inputs[i].str, "%Id", &n); + DIAG_POP_NEEDS_COMMENT_CLANG; TEST_COMPARE (n, inputs[i].n); } From patchwork Sun Dec 22 00:04:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852895 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2772630wrq; Sat, 21 Dec 2024 16:27:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdp8VCRHI5ySEmsSQgv6eZqmBm8EB+JvdzJiVp9HSFknHsoJEuvcaHaqKFP30CXnkCxrTZGw==@linaro.org X-Google-Smtp-Source: AGHT+IG/4WAwyLvDi8bEQ0VWC2kjWJSPSaeiXjpSLbMFtL5Jh5ddeysQSjDS+TbtKMMa3otiy7PF X-Received: by 2002:a05:6214:d46:b0:6d8:9994:ac30 with SMTP id 6a1803df08f44-6dd2335ddf3mr106550956d6.26.1734827226764; Sat, 21 Dec 2024 16:27:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827226; cv=pass; d=google.com; s=arc-20240605; b=dozBKt9RYNrulcbCIWxGoeMrOh08AR3c/ju5C6MuyRvc67K7WpVGw+lbYQKXQ0R+Jg fqlT/eCS4zPexdhnhb1HadnZZtEYcEIugTius0qR1iXQ568pjaBasliKZwT30XlBl54S Iup5/1Wna2S/F9gfWfyz2bX1BmJAUoKI+irHUMi+S5jqhvWEV8wkgW0j6VLr1J+SfqAL 384AIvKVh+fRzfxjz7r3lyOLugXyPjtCelmKxMQRL/2srrsY7CWXfyVEqDrqh5/FHVxi Yn2gC4dO6cqjitAM0XQRn8MmUL+5VZ+cjp7uP8NP/Z0uetbp/7c3LXXg3pSXevVLUTME a7iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=1ZVs85olvChCf/B/bJLmUmjV+4FjbISVD1c1J7edXgY=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=FvbqIOpHWcJ2dmzTvMBuoHNUC0+oOpQV+CjViEwwXCTMw/Q9gxkJWjIRYhXIWf1QyQ rSCJEhpJlamNIQG4fCAigOLH34UjmBa9qOnSODpLI7fMtRU+W5UihJsiln4y4mRi4WF4 +Jo+N0m+LFermZbOC8Eom096vn08jCOmwlUpUcTpdQQrthL+xdMfeYIJp0DYhidKjfUi FyJRlZ1bIGTcE4WfdJdM8iIIoG5inEp++uyyhTeJ+/3jHFe0kqjMiFQxr6FIBQvMGgbP Ih3iJtVSe+XixOIjRve04DVfGMz0176HBQKoQ8+SMnFPNn+rI8iGnw09NkF2rrSZo5fl nccQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eW1RftPJ; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd18366a3dsi73725856d6.484.2024.12.21.16.27.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eW1RftPJ; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39588385840D for ; Sun, 22 Dec 2024 00:26:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39588385840D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=eW1RftPJ X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 9196C3858C35 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9196C3858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9196C3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=BJh544t3XwdMjAb5QchUcOC6xK0OSM9FY4rro3I050M2Y/KtmXyZQ3R9OcB2o4uKu/H+5f9D1hApNaxQf2ItxjJAh++FpMQzCUYw/482skQ/vUseEntnkreA1aD4sYQ46N6+qr0vUdYmaU43inRwJaGUSVMvce1D3lxHTRkVqLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=32UUnvDxa8pCMO3o4HjO3B/g6ZUlKURe7kPp+cZJizk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xnBJy1mak/qAuAOWrJfN2RFkzASUDQB5ArK0F9v1bBVYHR0uQoP8dsEYZYsxFNKEonnp5oeVehM8C9f1Odyw9wiWApoiBoqcpPrl7U58nigHjlDaO3NxpObt1pjW7hcJPTyq4TPoW67ZPfQZBETyl5iW2s2yKfC84qll5QJJ3YY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9196C3858C35 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-21636268e43so35663895ad.2 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825923; x=1735430723; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1ZVs85olvChCf/B/bJLmUmjV+4FjbISVD1c1J7edXgY=; b=eW1RftPJGECaIQEPSq+K3vR8F4HVfUKyJ/Ci0uFzWsCal1hbdibk44PhxCHDI11WTQ Kay6YkmfelSrvo2tjv2CeoJVMMJopsK2n57nxdloj2i3Z4AbtQ80pFeS1XB5AIbSXo5y epYHTf2Qy0GOfl5CkBNpp/bRjYdQpCrJz9dIwGelzAl/QtdeR7/gy5UrYy4iFdyQ+giE zyRHd8A5nQ5ZTyZypMt/p3yf5M71n2rpX0E9doXHgi8sWOT0jTfFhsDopXcOXeF+gcSN KHRXy+WHt9IBobgslrMa3yvey/nU/gMwaeS+b3gkaFw1exzklZ1GAB5i6SAdQNG5TtIU 0q8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825923; x=1735430723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZVs85olvChCf/B/bJLmUmjV+4FjbISVD1c1J7edXgY=; b=byatc7jbgClntETfHcuTbIxcRa51jDjagcbe0kuxzrzqzrXuU2x91DUmoO6M3/MApd Uy9A4QqldxexjOvhnBb9fYffrMbrdQGFkejBHpvGf0dyAlXbAieMX6hFlBxlmGNZUFza LBJyQ2wHP3ZAlNsFJBUt7zMRzM5TKOfx2EJbqK6/5Ogz+3FsvYBgrmwaGydQtIrTLmVo 3O7kp32xohrIFPiHF870vTj6BRrddAjF4ZEdND2tqoKl3g6nPA8+70qLJs2m1Ky2nyrU bsfEJNs7IcWx4ETOTBEjWBvvCgHZEEmCMDRIbPtBTFT4iwdvMh5wm/qVPMWSE7uEi6AX j5qA== X-Gm-Message-State: AOJu0Yzl+Xj9zVC1Maeo2z7hWco5KLFBCr9TsMbRRewrxKc+7W2tex8Y Y83YIpVNhMnDrgXl1TK1oxL/R0VkHhV0W5gBNSEtE9D+tIsyFE+5h12c9zO2W+7jXw== X-Gm-Gg: ASbGnctSNFF8dnb/cMHn+vN+50iQQZgMUgoQh5mksKq9z/pcItVDzGn0NguHf6eU+U0 lVm4mY9+KwhLoarUzKW1Y394PWA2ncKo0pFiKkVPCIdo/ckCOW3ScKf8i9kqaLZlktfU4+8nCOb GyY+JAq4hDWKJpNHZ4EgbH/huxXE3BMpnftYcfQ5d3R+106Nh7Wzo2eo/JqbSFPYZsiJIzU+RvV iJRrijpX2zQJbdk2WXsdjA0c5ZJkVQ9lKHCg5UHySHxIa1Oe73ugm5K7w16SIpNuNMFQeQ= X-Received: by 2002:a17:902:d4c4:b0:216:2d42:2e05 with SMTP id d9443c01a7336-219e6ea19b2mr128223265ad.22.1734825923422; Sat, 21 Dec 2024 16:05:23 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f51a0sm48827055ad.187.2024.12.21.16.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:22 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 9916EC0BC1; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 33/39] stdio: Suppress -Wformat only for gcc for tst-sprintf-errno.c Date: Sun, 22 Dec 2024 08:04:56 +0800 Message-ID: <20241222000509.2205895-34-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Reviewed-by: Sam James --- stdio-common/tst-sprintf-errno.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdio-common/tst-sprintf-errno.c b/stdio-common/tst-sprintf-errno.c index e00c3fb485..2ea1fde2dc 100644 --- a/stdio-common/tst-sprintf-errno.c +++ b/stdio-common/tst-sprintf-errno.c @@ -24,7 +24,7 @@ /* GCC does not yet know about the %#m specifier. */ DIAG_PUSH_NEEDS_COMMENT; -DIAG_IGNORE_NEEDS_COMMENT (11, "-Wformat="); +DIAG_IGNORE_NEEDS_COMMENT_GCC (11, "-Wformat="); static int do_test (void) From patchwork Sun Dec 22 00:04:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852894 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2772477wrq; Sat, 21 Dec 2024 16:26:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW/HBYLkmykQQ6iWTAesl+txm4XA4AI3GgfrQmfPzet1rqiAPzrD8S17RYGNrUU5YNBKapOEA==@linaro.org X-Google-Smtp-Source: AGHT+IHV7oCLzcp2G+QnnaK6k3GLsm7OhfevDDwtwIFn0OIGC+XMmi93kRAflLnbZ2N5hOiPaZgN X-Received: by 2002:a05:622a:1a07:b0:466:99a9:c354 with SMTP id d75a77b69052e-46a4a8cc49cmr140472551cf.22.1734827181102; Sat, 21 Dec 2024 16:26:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734827181; cv=pass; d=google.com; s=arc-20240605; b=c034DU+M5ERLDWAk2sNHWfOVw53/LdKjQkz8eMJ1viTcOqdUNx4mXjpfc2O0fyWRp7 w13QJYWUW6XzrEiKKCZcTDiHhRPUrQLiP3GzQLDNy6LK0PmeRxCFsx5Lvukt4ePOPGlH oOMzQ4OAWct37nwyKdRzpvpcdwIt85IcZp+zxz34DRyMeb7Nr7zFRZ70+oj+YGrfF0ge J1Xi/GzPSeJEt3xPkfSsDep9d+R65TX+blQ7mqM8Q1cWOvrOwg9i0+Pa0YgSf2IwEca/ EQAQnGQ3XsMw3Is3BhIWEmlxl+IeRT92E4QA0U2RgoHIKxS8gPzj6oIGYa21xdBzaAr+ XMlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to :dkim-filter; bh=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=FiWvCRTZORHikcw/zDR/xPLbJt9bmtz/PbDYo/s3yiv6+mRKJ1iUCH1fBwVasCBdSk /LrfozncEhrgZnVbuW0DnIG/st9La4XoifUkY0+5jfcrgUeC1P93zSCQ+XSg/7bW4SgK b5Mfry8OqCVZJ1ftHr0/8SHVZGKhUCZT/AbI74kp1gd60CTWhtdxsBTyDdr99vkX3cy6 /1GlvUcBqt801JJzjniYAjkgLL39a2EyHKOoRj6JxFCHnQybzMrfemphCDEfkh5QAhzk A5it/QsOvS8pVhdulsec59yna21Vw+gejeQ4Kctvx9H/nxmBUzjoQVSjkHIye7TnZdcN P/Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d9hd7ZlU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebd5ad8si79920841cf.503.2024.12.21.16.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:26:21 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d9hd7ZlU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28D8A385840B for ; Sun, 22 Dec 2024 00:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28D8A385840B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=d9hd7ZlU X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 8D1453858D3C for ; Sun, 22 Dec 2024 00:05:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D1453858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8D1453858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825932; cv=none; b=wYnSC1hTJtE/I0cgobBKDanEypGDtFivqjMjYnrto7IALVgRJMjzpLAUpa1yWZFextPaBgUSiGRr5FRoF4P7H+cB5JV2sDZDytVeKslFJ9wmpQVNRVQa78FE33mKINHeAH9+CQGDw8yL+GWPEPbN4R45zVwIgMlaKMTb47Mfhe0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825932; c=relaxed/simple; bh=hz7kEMnANDL6blh70kpqASKdQiMACKrrIDXnCkehVC8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qDFRlUwRV7FY2kO/lbQ5F90VLOtB57IgFdcYPfbo+LPHGaKhOkJJ5Evj34MeDuoAnnb5k6bfPxHLvLHyp39rRrAN2ZtZzo/1gWUgfTPs6FyHw//mzRM4mmmuYhSJxQx9hXA9RIK8AyzfZVpqnsgj611TZEzE2ykjtPAKgovSY84= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-728ea1573c0so2629052b3a.0 for ; Sat, 21 Dec 2024 16:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825926; x=1735430726; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; b=d9hd7ZlU5zmRX0o9W+NX47fyoVfmEIkX1I0LLSNfg6EQqsaqKRKJOGPc7qDgaP+20K wojfeWEBIRg22TPXHQt8Ot6WuZJSsc27qoihcfjQXkUosJexnERl7+0uzHkaBcf+B/lv /kFYoCyl8aVm4ie0zBDxYLo1ZLP4BIeh9a7y/hKdkKJURSyKIu5vrXMc8Eec7W+kyl3C MrDO6l815XXXu8WqJP84XEcTrEu9NmV+bcwzjAe0UWp09VAAog9OPbTYqpiHX0y89c3V 91VoImReSRryI+6FB+ZR3aqnhsX0mwQ8Jh4LjuKZil+Rw95bWbw9DcBC6HF7cdWEZhGf zdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825926; x=1735430726; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cz3JwGlOCBIOSYp+zi/uZDJi2iX0p9V1j/DCExOeaT8=; b=tYfa0KvmlAYWc9stGjv5obEHi3mtF5ZosUKWLsU1wGa4gLS59qcDatMeXcGBMGHMhZ bG6cpt4EHa7cKlRk6Wftfadqe6EeVEVsVJBSd7zThQ+/KkUHJ7pp1H5kWPqmz5Tqi769 5UY3LkrzKoUS2aAuyqxugwmXOzrAm0Y46SRLzYm+vho5xueB3F7G2DFwwQPK8E3LDViv CllJdbl66r/vAMVtFYoZUKxbI38JLX5KULLuK1RY59JT0Bbp3UkaBvk0xqGAJlCQuLNO KlXH5oQ9xszZ3JCQPy8FsU162vJE1wU+O0kn38L+8fprsWQu/F05jn5Df5YDNbhKaKq0 a/Kg== X-Gm-Message-State: AOJu0Yw4HcCwLPKvPsUde/M6V6sww4GCKPqYasos7Y4C8RQWT+19pqEp cEjWqg0oBeX4rhECut0XVwX5du7nQn29yy9kKeJHCXXN59y5qejW X-Gm-Gg: ASbGncsuTHpxcQDlSx40WSS9KCBLi9j0DXLthYB7jqV2T6bfkhidYGi1s1h/PC3X2RL x3zevEECOKE5rxN7EkwTY1sWjufSZBo6XOd+mVntiJvDNJJyZcgSVZNMdgHdlBaFQqL6bEROinx 1PCc3B+6Jlxyi/tiLKK2w8kDcW9QCJxePXDlt4D58kgZfftkskR+Cq8vDUYTgwLlNmETlUIucPK fCaVhzDIrpMN5EuHD2ODmwUXE1xVuDCz7A7WRCxQ1yFjyuh99rTxBAzhbJkMtUWKVL292I= X-Received: by 2002:a05:6a20:d499:b0:1d9:c615:d1e6 with SMTP id adf61e73a8af0-1e5dfb65989mr12386101637.0.1734825926143; Sat, 21 Dec 2024 16:05:26 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842dc605001sm4846545a12.54.2024.12.21.16.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id A3BDCC0BC2; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 34/39] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c Date: Sun, 22 Dec 2024 08:04:57 +0800 Message-ID: <20241222000509.2205895-35-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Clang issues the following warning: tst-vfprintf-width-i18n.c:51:34: error: invalid conversion specifier '1' [-Werror,-Wformat-invalid-specifier] TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16); ~~^ Since it does not how to handle %I. Reviewed-by: Sam James --- stdio-common/tst-vfprintf-width-i18n.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdio-common/tst-vfprintf-width-i18n.c b/stdio-common/tst-vfprintf-width-i18n.c index 1be6dd7782..93f8abab56 100644 --- a/stdio-common/tst-vfprintf-width-i18n.c +++ b/stdio-common/tst-vfprintf-width-i18n.c @@ -23,6 +23,7 @@ #include #include #include +#include static int do_test (void) @@ -48,6 +49,9 @@ do_test (void) TEST_COMPARE_STRING (buf, " INR12,345.67"); /* Translated. */ + /* clang does not know about the GNU extension 'I'. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier"); TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16); TEST_COMPARE_STRING (buf, " १२३४५"); TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 26); @@ -58,6 +62,7 @@ do_test (void) TEST_COMPARE_STRING (buf, " १२,३४५"); TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 26); TEST_COMPARE_STRING (buf, " १२,३४५.६७"); + DIAG_POP_NEEDS_COMMENT_CLANG; xsetlocale (LC_ALL, "ps_AF.UTF-8"); @@ -78,6 +83,8 @@ do_test (void) TEST_COMPARE_STRING (buf, " 12٬346 AFN"); /* Counts bytes. */ /* Translated. */ + DIAG_PUSH_NEEDS_COMMENT_CLANG; + DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier"); TEST_COMPARE (sprintf (buf, "%I11d", 12345), 11); TEST_COMPARE_STRING (buf, " ١٢٣۴٥"); TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 20); @@ -88,6 +95,7 @@ do_test (void) TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥"); TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 21); TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥٫٦٧"); + DIAG_POP_NEEDS_COMMENT_CLANG; return 0; } From patchwork Sun Dec 22 00:05:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852887 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2769615wrq; Sat, 21 Dec 2024 16:14:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWH5mB/UTjcC9t/ZdkdcCqcoxqN7iebbUM6eaTnJY1fcT7okA1qt6RNilZu31Dkxr7Ff8bvEQ==@linaro.org X-Google-Smtp-Source: AGHT+IGnCSPPOXv+2b2SBSk6fddZRsjwyMp/hWXzcxzd0pk/ue98NVeeO8cut3ISne+AzKXOiDl4 X-Received: by 2002:a05:622a:1316:b0:467:597a:be4d with SMTP id d75a77b69052e-46a4a8ca0c0mr135775601cf.18.1734826479936; Sat, 21 Dec 2024 16:14:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826479; cv=pass; d=google.com; s=arc-20240605; b=RY32FcK7oewJZCoRKDzn/KHgdCklygf+t3IFpdhUVvTd9hXCYt/3nfBgTIC3UnvIxJ mh7+bqFM/TO3koSQzbc9Ya1GrjhbjzrzdkBceGnCzims9iZ12S6lNUTK6kkSCWgDZc4d e8JoTIzqiQe/Djn+LwCpRaSJP/1u+y+xa+UFXm6+fBhvsbgk7PwJDtZTieEzGyHZie5R g+HTrT9crGwgM2GsyJkU84M9Zi3fg79igQ2+lzX9hN2bvuCT/3x/yquqFKTztoCjm8Wg MZjkILzrjjUWUn3erP87DwsDccsoeWiTX9beQTrLuapPl6+4a7FsLXXSohdshhuRoY7z 57gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to; bh=v7VngvbnFDE2Cj1MDHHqRu3qVfll7DYdZj+JZYPeVV4=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=T0CJ1v9VTHXfIzZMINKRd01NYi43ip31o/IuqvoSPxqhA50eJLIOn/wlo4rxENK3DS yvb/v9FdC4QPXX1R5CWTcwmY+9pKeivzBpUfEu9ixXn8k9Q4FFtJA9FtkoU5yy1vTfdv ay4fYRTd6uGJRUZgojZzVWUEieFWbGabgbUT+YJCPIM/O8jnzedeVfqYdz/VdOWEJlIq AiRgm1HdsYcMYfKSePkORBYKbFPDyKaZl/vnIq+xLHEpdOoM7q8sLuLEFb1WYi6ltRq5 JXBKZ7BuFK9CpTUt0BjDOPilpXrBpeVAJ/vlbwMNP+4po6Dvk6w6LueQcNDTiHcqF4Jm CH0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YDVgoSFF; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3e681862si78710731cf.92.2024.12.21.16.14.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:14:39 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YDVgoSFF; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A5873858435 for ; Sun, 22 Dec 2024 00:14:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 8DC4F3857C58 for ; Sun, 22 Dec 2024 00:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8DC4F3857C58 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8DC4F3857C58 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; cv=none; b=cNVbyHKFTt+MQPBqq9T4NHhWwMknJs08sRI106f3uLC+931vr/8ZtohQCOn0nN8sfx3gIrIauzpsYS0+O4/idGJZbe9UuQVdCf54TGWrVcF5lUtU8OstFTUdYFvbkqwd9GEerh+OY5kXxDeLE+gPHJFS+E8MhWL4MVoiuNGMnso= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825930; c=relaxed/simple; bh=SqEdihGz0j9aj/+VoS4Zbu1Tm3eCkluoFVsAt7+t64M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nbAvkHWcd64cpu8mXVaV/rO18LQWWFSAk+7v4D+Z4NXGDEfjRIDGyS4QnkyX0u/7HAaGsZkL4q1ApxBZV9uVDiaiRfPQo4a2ZF6d8iN25FmAbG8FK2R9N3IuQ31nulOjLKVGXZXaIg+KSwHB7Pib1QXyVJCDNUm/4HEEzdlZARo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DC4F3857C58 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=YDVgoSFF Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2165cb60719so29698815ad.0 for ; Sat, 21 Dec 2024 16:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825924; x=1735430724; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v7VngvbnFDE2Cj1MDHHqRu3qVfll7DYdZj+JZYPeVV4=; b=YDVgoSFFL7mM26ARE5cyJNhutRVBQh11Ewmo1ZsyJ3ct6M5z5z41wZDC8/h0+5sAby hKhZbGbq6RUwE7CXehlDtY4sLqkbQ2BFWGAECkmLvI55zApY0EFSOSYjXxHRrLG6rxz7 P80L0iI30N1pZdy02QXoRJ1tkj3cRLOHgT7MYnt+iZvzltSp/XovUfSvBiJ+d30Dm93u H+nTi7rGf47fkhDmt5lH63sheTj/oeK9zmAwn1kdqM0aMTZm/4S75sdaI06RmA9YT5Kg BfJptS8O1j/pZpatoiKG4LhZiSTNN0y6wbmvrQwHOXYy1PCqrYZUjqZ9u/HSk1T5IA9C pdGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825924; x=1735430724; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v7VngvbnFDE2Cj1MDHHqRu3qVfll7DYdZj+JZYPeVV4=; b=PY/c+fOMe4m26IPw1hZpcJuFpIpc/ubzw5nRhCslrdGApU+aFlL0JtLrDG1fDnBjCp gkYKOsHIM0K7b0Fj6dONwkhfnpjbjoaaKENDdOtG+Xc3o9Dz5D3/yjpSM3JPSbLZL8P+ cDGfuT4rnLwO3lS0ZKxPXs0h6OOgOtEdxilcTR+T0u6s8RZFoiTYKLx01IJppELrUcac 136EqrvjgcgxkiAOn+VqXpvQ/+l+gmZFsrdSFGi08x+iJfkkF7jz/p+aYcsr9q87WhWZ +Vs9adjcAecirGb2NpyzX0DOPjAuBpL0ABV6bPBm4TWQ4OfnMoQpCKcMfpWcAkGSx1Gd iwKw== X-Gm-Message-State: AOJu0YwzyfDfe9//ZmJbXM39Ma45cKyoNfhH02xGUvO3juy3FvwgEvyF 6GwW24y1ubMehLMBpqJvz/H9V4Aj5HC01FOTnZGq/buyYWVCRN8Qmcs09bwhxgiOCg== X-Gm-Gg: ASbGncsPJIqnxnBNJmMc0dBnuOR02vXpnd+dGmeJ2GA6aejntBk2AMyQddX9PcYlAuK 3i9wONCQrfWn8CeYx86p9JBVnAWE2Ei1W4IzXylwwsMyBqWXJbn/yw1qmLMiaDjDHH9er7kWTPm 7VbgG3F0WzYDuJEcQs0UuTikFFC+wye8FbYGEv2W+fX274gc4JB3wwG2xETmCVIlzCMLYSofMVf tIpjaET8danRh4NViioXvYO84X4IcOt2mLciDWHzknIuaDK7+EduqkoI+gTv9CEgpEuAvU= X-Received: by 2002:a17:902:e5c7:b0:215:19ae:77bf with SMTP id d9443c01a7336-219e6e9df25mr105323245ad.19.1734825924454; Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dca02e60sm48789915ad.273.2024.12.21.16.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:24 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id CE4ECC0BC6; Sun, 22 Dec 2024 08:05:15 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 38/39] malloc: Only enable -Waggressive-loop-optimizations suppression for gcc Date: Sun, 22 Dec 2024 08:05:01 +0800 Message-ID: <20241222000509.2205895-39-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella Reviewed-by: Sam James --- malloc/tst-dynarray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/malloc/tst-dynarray.c b/malloc/tst-dynarray.c index 757add26f3..1009e27dfa 100644 --- a/malloc/tst-dynarray.c +++ b/malloc/tst-dynarray.c @@ -482,7 +482,7 @@ test_long_overflow (void) iteration would invoke undefined behavior. That loop iteration can never be executed because an allocation of this size must fail. */ - DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations"); + DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations"); TEST_VERIFY (!dynarray_long_resize (&dyn, (SIZE_MAX / sizeof (long)) + 1)); DIAG_POP_NEEDS_COMMENT; @@ -499,7 +499,7 @@ test_long_overflow (void) iteration would invoke undefined behavior. That loop iteration can never be executed because an allocation of this size must fail. */ - DIAG_IGNORE_NEEDS_COMMENT (12, "-Waggressive-loop-optimizations"); + DIAG_IGNORE_NEEDS_COMMENT_GCC (12, "-Waggressive-loop-optimizations"); TEST_VERIFY (!dynarray_long_noscratch_resize (&dyn, (SIZE_MAX / sizeof (long)) + 1)); DIAG_POP_NEEDS_COMMENT;