emacs-devel
[Top][All Lists]
Advanced

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

Re: Simplify internal_catch()


From: Stefan Monnier
Subject: Re: Simplify internal_catch()
Date: Wed, 28 Dec 2016 14:28:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> There's a fair bit of
>> 
>> Lisp_Object foo;
>> 
>> foo = ...;
>> 
>> around, indeed, because at some point in the past, some C compilers did
>> not support "Lisp_Object foo = ..." when Lisp_Object is a union type.

> Actually, that kind of code was around because C89 did not allow
> declarations after statements.

In some cases, that's true.

> Even ancient C compilers allowed union-typed
> expressions as initial values for auto variables, and "Lisp_Object foo =
> ..." at block start has been in Emacs since the beginning; it's in the very
> oldest code (dated 1985) committed in the Emacs repository.

At least I know Richard made me undo some "Lisp_Object foo = ..." years
ago, saying that we shouldn't do that because it fails to compile in
some cases (presumably when you used some specific compiler and you also
asked for Lisp_Object to be a union rather than an int).
I did not heed his advice very eagerly, to tell you the truth.


        Stefan



reply via email to

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