emacs-devel
[Top][All Lists]
Advanced

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

Re: master 37889523278: Add new `swap` macro and use it


From: Eli Zaretskii
Subject: Re: master 37889523278: Add new `swap` macro and use it
Date: Sun, 14 Jan 2024 09:07:51 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  stefankangas@gmail.com,  
> emacs-devel@gnu.org
> Date: Sun, 14 Jan 2024 13:14:47 +0800
> 
> Gregory Heytings <gregory@heytings.org> writes:
> 
> > FYI, Stefan's change did not break any build.  "typeof" is supported
> > by all compilers with which Emacs can be built, either with the
> > keyword "typeof" or with the keyword "__typeof__".  The only notable
> > compiler that does not support "typeof" is MSVC, with which Emacs
> > cannot be built.
> 
> Stefan's change (which I reverted) did not use __typeof__.

Instead of reverting, the swap macro could have used __typeof__ where
typeof is not available.  This has been pointed out several times
already, so I don't understand why you keep raising this non-issue.

> > "Every implementation in existence since C89 has an implementation of
> > typeof. Some compilers (GCC, Clang, EDG, tcc, and many, many more)
> > expose this with the implementation extension typeof. [...] This
> > feature is the most "existing practice"-iest feature to be proposed to
> > the C Standard, possibly in the entire history of the C standard. The
> > feature was also mentioned in an "extension round up" paper that went
> > over the state of C Extensions in 2007. typeof was also considered an
> > important extension during the discussion of that paper, but nobody
> > brought forth the paper previously to make it a reality."
> 
> Considering that EDG and GNU/Linux compilers are the only compilers you
> have named as examples, this list is nowhere near sufficient to prove
> that "typeof" does not break any build.  Which is a very presumptuous
> statement whatever the length of your list, when a build breaking was in
> fact the reason for this change...

The only breakage we know of was with a compiler that does support
__typeof__, AFAIU, so again: why do you keep insisting on your
absolute rejection of the macro, when all the real problems have been
addressed?



reply via email to

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