unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "João Távora" <joaotavora@gmail.com>,
	"Richard Stallman" <rms@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: How to cause a compiler warning?
Date: Sun, 14 Jan 2024 16:26:59 +0000	[thread overview]
Message-ID: <ZaQLU1hGH6YrwMIc@ACM> (raw)
In-Reply-To: <874jffsyfy.fsf@localhost>

Hello, Ihor.

On Sun, Jan 14, 2024 at 15:54:09 +0000, Ihor Radchenko wrote:
> Alan Mackenzie <acm@muc.de> writes:

> >> > 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.

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

> What about `macroexp-warn-and-return'?

It is a complicated way of calling byte-compile-warn-x.

It probably isn't of interest to Richard at this stage.

> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2024-01-14 16:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14  3:09 How to cause a compiler warning? Richard Stallman
2024-01-14  3:20 ` João Távora
2024-01-14 13:01   ` Alan Mackenzie
2024-01-14 15:43     ` João Távora
2024-01-14 16:21       ` Alan Mackenzie
2024-01-15  0:16         ` João Távora
2024-01-17 12:25           ` Alan Mackenzie
2024-01-17 13:40             ` João Távora
2024-01-18 12:05               ` Alan Mackenzie
2024-01-18 12:26                 ` João Távora
2024-01-14 15:54     ` Ihor Radchenko
2024-01-14 16:26       ` Alan Mackenzie [this message]
2024-01-17  3:29         ` Richard Stallman
2024-01-17 11:59           ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZaQLU1hGH6YrwMIc@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=rms@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).