emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to cause a compiler warning?


From: Ihor Radchenko
Subject: Re: How to cause a compiler warning?
Date: Sun, 14 Jan 2024 15:54:09 +0000

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'?

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]