bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#15880: Compute C declarations for DEFSYMs automatically.


From: Paul Eggert
Subject: bug#15880: Compute C declarations for DEFSYMs automatically.
Date: Wed, 13 Nov 2013 20:13:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Stefan Monnier wrote:
> I mean, can the C compiler
> really presume that symbol_vals[0] won't be changed and constant-fold
> its value at link-time?

I was thinking of something that didn't have a symbol_vals table, like this:

struct Lisp_Symbol symbol_structs[N];
#define Qnil make_lisp_ptr (symbol_structs + 0, Lisp_Symbol)
#define Qt   make_lisp_ptr (symbol_structs + 1, Lisp_Symbol)
...

Qnil, Qt etc. should evaluate to compile-time constants for
any reasonably modern C compiler.





reply via email to

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