From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by sourceware.org (Postfix) with ESMTPS id 9EA7B3858D3C for ; Sun, 21 Jan 2024 22:51:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EA7B3858D3C 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 9EA7B3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::82a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705877504; cv=none; b=xlDoDaMVCF2pBjHP1G5x83ct/IP+diMJpE7gfmHab6iyKWlJJ0+Vdk+YMupMyZTLpqeGJoa+uROcadrhhVzaS6YTSAkGYP5zg+8LdaGeCJn3cfpFsaqAAywz5/MUekUz+v+LOr2EjHP81CfjlFaObT0WiiXJCZw3tcyATSbLgk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705877504; c=relaxed/simple; bh=tRyz0DzoLyfyN30MwZ8DLx5XAKBDg12SJhwzLCsT+10=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=vqMoovOelFbkL52/HwciAlVRzo03hZYvTJ+eKiKDv4/z3lq/6LqDOhcXgX+UGKUAL/j+6FPU7v73IOlUEKJH2j/9wo+w0RW9d72FxwbcRx/+at3zWAZt0gpI/VyajgKb/rQbKs3QbFmozY8d1uaXKWHMIzxGInW2v35ZILTvRt0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-42989a64713so26113971cf.2 for ; Sun, 21 Jan 2024 14:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705877499; x=1706482299; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pPEG7CyVyw9No1cdfhXJGAOd9+gX5lYSvYwP0yfycUk=; b=g43CndH3yeAHADkl8haJNYNqZZoDm9BLFCneeyTQC/ux2F6hIuUqJvFRJq/0XJhgNt ZBG3ytNnHLI2mb3bBc+3cKzN3u+tYz1EkWZ6GLIwN0oPceRBrY4qm8+hKIwwt04o67j6 3alVE+QRXy4LP6pfq3dquwnNioEdOv6H3P3c0B6fBF85MXWq1FlVTP7+z0lkfGNG6Ki8 +MJXpiuyNljh3Gvv7jk6RbAl0z8LYTXsPNGQZegFhFMLz3FCSElt4Szotkd6XG/T8QUx 497mpsRjO3U6/8c7Ntp//zDxLAd4w2Ki7qNCrmJYbZhnJ3N7ETDFJEqIz6BMXFKYav4B WfsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705877499; x=1706482299; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pPEG7CyVyw9No1cdfhXJGAOd9+gX5lYSvYwP0yfycUk=; b=jWuy4bvKK7QStbWbx0kf/rMcCBl2MSiEZqpIYON8TowlCLwqPTkcWSkNbh6Z/Kuzbp 7iLgMd8MJjQXm3aUezbi0sMcblSinhi21nUTEwezo+xQ96MRwm4aeP/5OnQPuvWUgb7I o+Qc0HJi4xMTpq0wVsO13D4yciGR9vYb3qAxCdM+v9HdoisL5X6ZSYtGS13LmJtXy6GD QMoKuhW1hppO2bRO31WXA9uEdhyDFmwSSEdJZE3vZt1isYe1O6YKI9H+y0KriEYnWnyR lnjJid0lL+jYyTI+olzrY/QoZIFEvbUjINFSWxN7zeLLacNCNWr+ReBZ2pvLxMCyOOMt jkjA== X-Gm-Message-State: AOJu0Yxky9Qcftul3IGqPwS7n1Fm+nOvdVh2mbw1UfnmHlYeqc3iAqRR TUzmgXc6pgaf8hzst7lsHscB7WSUkxGeezUNj/i4XsCJhqmyK6q6L7EVjVPt X-Google-Smtp-Source: AGHT+IFjta4ynTtgDiiMUC1sTmCpedf3MtceRNdj4eLByLMz8ZVzMTHzQ4wbfoi6xgTTmB5Y2U9oBg== X-Received: by 2002:a05:622a:1741:b0:42a:35bf:40f2 with SMTP id l1-20020a05622a174100b0042a35bf40f2mr3412304qtk.58.1705877499166; Sun, 21 Jan 2024 14:51:39 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id gc15-20020a056638670f00b0046e3432a5b0sm2793127jab.177.2024.01.21.14.51.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jan 2024 14:51:38 -0800 (PST) Message-ID: Date: Sun, 21 Jan 2024 15:51:37 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Committed] RISC-V: Suppress warning Content-Language: en-US To: =?UTF-8?B?6ZKf5bGF5ZOy?= , gcc-patches Cc: "pan2.li" , Andreas Schwab References: <20240120002739.2860933-1-juzhe.zhong@rivai.ai> <6015693d-ec76-4737-a4a1-f319418bafc5@gmail.com> <23E6260D5D91876E+202401200918412733588@rivai.ai> From: Jeff Law In-Reply-To: <23E6260D5D91876E+202401200918412733588@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/19/24 18:18, 钟居哲 wrote: > OK. I saw the other arguments there: > >                             tree fntype ATTRIBUTE_UNUSED, >                             rtx libname ATTRIBUTE_UNUSED, > > So I leverage these and add ATTRIBUTE_UNUSED to 'fndecl' > > Maybe it's better remove all arguments for riscv_init_cumulative_args > which are unused as you suggested. Yea. The biggest problem with ATTRIBUTE_UNUSED is that it's a "may be unused" and thus if the code changes it's sometimes left on an parameter incorrectly. C++ allows us to specify a "is definitely unused" concept by dropping the parameter's name, but leaving its type. I just pushed the obvious patch to fixup that function signature. It would be a nice easy task for someone to go through all of riscv*.cc and clean those up after gcc-14 branches. jeff