From patchwork Fri Mar 22 16:34:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1915010 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=fXe06W/g; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=hmDLC4Mm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V1SbQ5Pt3z1yWp for ; Sat, 23 Mar 2024 03:34:41 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B8CD23858419 for ; Fri, 22 Mar 2024 16:34:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.24]) by sourceware.org (Postfix) with ESMTPS id D70E43858D28 for ; Fri, 22 Mar 2024 16:34:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D70E43858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D70E43858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.24 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711125262; cv=pass; b=edQK0Mc/mfG+vYIgT2sbrFWQXsdQwirn1TkLU4ae9cFzcGBa5R6xDoTBgWTs1AMVQF0yWU9+lJuAFe30e3D72XYC1jMP5pAhAKj292D3J2JzaMJhGdHd7Q/9a0b+eVCdrgE980cANH5w1EDUoR3ASDOzP6JceHacz802aVWTki0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711125262; c=relaxed/simple; bh=u1i0nVYzwQVYeOGpzEHGLE/Elm8M9d7BluWZouKfXVo=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=a+TSbJfcRYBiQO9gArmq5q3RA2cSr+cPF6lNYHVyP6wEM6/4TnLrxUIygA0Wc+TzqQpwH2E8UV9YkP5vLR2QGTRI00Imcs54v5bbMkgR/885akR619/qKZMGWgyBz4DP3wf5v18Dk6a5/JsEpHLrpj94PoClos5HBzXT1W8db+k= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1711125250; cv=none; d=strato.com; s=strato-dkim-0002; b=N5do0/uxUkY31Ej/rYyONIcxdfBxesGwf/OuF38NYoK6GSAfmt2bUVS6mUGTY+6caZ i3NgoxaeKNHBQAClOzdpwUEGYbRc7IZf0UsvhJTgVdxkwtNXeMauWWnnj9mOPhPgWe7z LYRXGuQrNfClqx2XOTfDIDqMc8bZ6R8ceA5h1mhJS1QZnjzkTSotioNgRjh76Nb04xIX OJ4OUYICukLKC/SDQX+fT8yR9uW6y/2jo2YifGkm4agQSUOpT2KUWAZb9+Wf/5Qh7UVY vv67dcnCKpDmmoyZmq/MUG/OjlS1IxVdmso4ieqmq/oGnjOJl3R180mqiCQ7hB4q3rSh ilxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1711125250; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tCny0u2J8HBYIW0n/hXs7ACYGgDCZKM0RqKsFmgG/2Y=; b=OF3HkVmt7dqGcQLzZ28/iJ4E/dN+NucW8GyaL6f2cpmfZEOn2FSuXFfFPBd0bHS9g2 25+dgQaChvhRAWVwold+krLpNdzzjwGkYhYKyvmPwhfi7nqo8M2li84IX5L9fUUEf115 AnoJHXQOeHoCfxTieSz7v+zMmoqSjtetq9e04cX1lJg9BMlDpo6LhVqOYS3AJiDgfJK0 5Ekj3AejgOEaDUYDoJg3016iaYoOBXW0VC7fBti9qlJD6NEwo7d6OUrMJ15Bw+psuUMA eMxqiO1tIoI83OXY2Rjln9uOIpsGGNyigIMj/1c0puPC2q6Zzzz4W2tuSeO7t1iPZ8mE 37xg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1711125250; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tCny0u2J8HBYIW0n/hXs7ACYGgDCZKM0RqKsFmgG/2Y=; b=fXe06W/gSXzKtMfkzOTX788Jf96sk4hWy1DjGGfdHOShQy8xdXKKY+X+MACz7TNs9N HHtQ08B2xICPjs4m2Cy5Y/CHh3kNRGeYTYP+eBmxk5ythn9Omer9iENG9W/T0psLTQTS 92errgjPQjao7zAZ/SLcwpy57u5B5dEurOTXPfzbA0+cUMQIItRlziUo/PalGuUQ9gwK VVsXKHvR3jI7mCKRrvqvQYfzeGrOHoBLPs+r1G80MQMEOGsFQ702Alurrfmxc8S2PWEg ghK8D76/dLaXrvXMocYAQyznSSYtwD1H7tFoPdncrybj9MJSHBQuwBodw4dREqKKJdrx ITzg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1711125250; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=tCny0u2J8HBYIW0n/hXs7ACYGgDCZKM0RqKsFmgG/2Y=; b=hmDLC4MmDWttVXKy1+q8jvbXdOn1z/9yr1thsJoDySZysvABnSVVS6gaWazpWZZbFi xLEP18PMhwyFNKses+DQ== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkSgcSjpmy9KwoMJ/K0VA==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 50.3.2 DYNA|AUTH) with ESMTPSA id x760bd02MGYA15h (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Fri, 22 Mar 2024 17:34:10 +0100 (CET) Message-ID: <219331fb-e297-442b-b2b8-68c853a762bc@gjlay.de> Date: Fri, 22 Mar 2024 17:34:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Georg-Johann Lay To: "gcc-patches@gcc.gnu.org" Subject: [patch,avr,applied] Adjust message for SIGNAL and INTERRUPT usage X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Applied this patchlet for a more precise diagnostic. Johann --- AVR: Adjust message for SIGNAL and INTERRUPT usage gcc/ * config/avr/avr.cc (avr_set_current_function): Adjust diagnostic for deprecated SIGNAL and INTERRUPT usage without respective header. /* Don't print the above diagnostics more than once. */ diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc index 12c59668b4c..4a5a921107b 100644 --- a/gcc/config/avr/avr.cc +++ b/gcc/config/avr/avr.cc @@ -1495,14 +1495,20 @@ avr_set_current_function (tree decl) // Common problem is using "ISR" without first including avr/interrupt.h. const char *name = IDENTIFIER_POINTER (DECL_NAME (decl)); name = default_strip_name_encoding (name); - if (strcmp ("ISR", name) == 0 - || strcmp ("INTERRUPT", name) == 0 - || strcmp ("SIGNAL", name) == 0) + if (strcmp ("ISR", name) == 0) { warning_at (loc, OPT_Wmisspelled_isr, "%qs is a reserved identifier" " in AVR-LibC. Consider %<#include %>" " before using the %qs macro", name, name); } + if (strcmp ("INTERRUPT", name) == 0 + || strcmp ("SIGNAL", name) == 0) + { + warning_at (loc, OPT_Wmisspelled_isr, "%qs is a deprecated identifier" + " in AVR-LibC. Consider %<#include %>" + " or %<#include %>" + " before using the %qs macro", name, name); + } #endif // AVR-LibC naming conventions