From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: How to cause a compiler warning? Date: Sun, 14 Jan 2024 15:43:51 +0000 Message-ID: References: <871qak4n4h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000050c54c060ee9c453" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10625"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 14 16:44:44 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rP2fE-0002WU-Eu for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jan 2024 16:44:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rP2ej-0002Qh-Bv; Sun, 14 Jan 2024 10:44:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rP2ef-0002QE-8v for emacs-devel@gnu.org; Sun, 14 Jan 2024 10:44:09 -0500 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rP2ec-0004Vw-KK; Sun, 14 Jan 2024 10:44:08 -0500 Original-Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2cd84600920so44207691fa.1; Sun, 14 Jan 2024 07:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705247044; x=1705851844; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fGuY0S6rYT+UexSDYUl5ak2ZcNr39Cc2h70JXkoW+dw=; b=PjxQq9bEWdgeUttDFtGr2L6jUbARYJ50BaddcJxTJaD5SEgptPda88J5Q9iOFqsydh rPtDnjXoHw6kaNdYgoBJY5gQfw1bver08dLejOPNuTpnz0auN3YmbdrkTfeUmmBJMxrK RNXqqgCiCry6qnqwiepOMuJD7bwMxGEMZ6gkoSoEqheRfPIhVRPGnjGcdAtGxW5u8TYN PXfPPnotZFBbFoV5DwL0uCICfbp5cabBbJ93H8/BHQpW4sDCdnA8koWQRDxg929oM+/t A3lbqkhrXG6nf0K0kfa49z8lh9T1oWyMr7JhdklcZAD3dzoCh5xQ2RlVsenlzvm6h3LT xPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705247044; x=1705851844; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fGuY0S6rYT+UexSDYUl5ak2ZcNr39Cc2h70JXkoW+dw=; b=bsBzZJXm1SaPNhNo4FmnxM59gfdiggkbw1ShnelGNPE6V4fDEq/HRrAfyuuMpRAyJb UcpyUzra1c5cpePuG+I0dt4XX3oxKW4tW5sV1A0bRXocZn3PsYvFV+s1OAM0DPfBhHRl i6fBq8l+4u0WmMISyUVkcUxZa8yVUT7yWceHAoUNdGYVaYMOXvfy/Fd6fdcIFWox5sc9 6wtgDORVl8+2mNAs+RpWUkSYKXfqnBhXprsmmZiQlGMcUV8VUM14pXolGdef89fTQ7mk BCY745+8WRX+jEbd6yw8YxQEZ8qagL3WWNHAne4tVtIxiU82LfR8w5ZysKzyMSuG76zC TwRg== X-Gm-Message-State: AOJu0Yz6tfAX0xkD32OrbxWprxiGhnQp7EtHiPaxtGjllrWNxWFIh3me yGbmVzjsLY2TMoaEHeqthyNZZw66qn9XnqLwMrgMSSeh X-Google-Smtp-Source: AGHT+IG2rzZbVZOb3q8mhoHM+abYDE+X2ZpGmw4YKkGSY+SwaIzzmbiFLC0mSNRnL/IpC9p91/iAGuY46aZqaN9OVB8= X-Received: by 2002:a2e:b604:0:b0:2cd:c1af:4c3e with SMTP id r4-20020a2eb604000000b002cdc1af4c3emr159400ljn.42.1705247044059; Sun, 14 Jan 2024 07:44:04 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314965 Archived-At: --00000000000050c54c060ee9c453 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 14, 2024, 13:01 Alan Mackenzie wrote: > > > > I would like to make the cond* macro generate warnings in certain > > > cases, when it is being copiled. What is the recommended way to do > > > that? > > > Probably call byte-compile-warn at macro-expansion time? > > Most assuredly not. This may give an incorrect file position for the > warning. > Aight, I wasnt thaaat far off the mark.. > > Since 29.1, the correct function for a warning has been > byte-compile-warn-x. > Self-evidently so, of course, the 'x' standing for "correct". Anyway, what about <29 compatible code? Jo=C3=A3o > --00000000000050c54c060ee9c453 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Jan 14, 2024, 13:01 Alan Mackenzie <acm@muc.de> wrote:

> > I would like to make the cond* macro generate warnings in certain=
> > cases, when it is being copiled.=C2=A0 What is the recommended wa= y to do
> > that?

> Probably call byte-compile-warn at macro-expansion time?

Most assuredly not.=C2=A0 This may give an incorrect file position for the<= br> warning.

Aight, I wasnt thaaat far off the mark..
<= div class=3D"gmail_quote">

Since 29.1, the correct function for a warning has been
byte-compile-warn-x.

Self-evidently so, of course, the 'x' standing = for "correct". Anyway, what about <29 compatible code?

Jo=C3=A3o
--00000000000050c54c060ee9c453--