Bring the scratch/accurate-warning-pos up to tentative functionality.
To exercise it,
M-: (let ((symbols-with-pos-enabled t)) (byte-compile-file "foo.el")).
* src/.gdbinit (xsymwithpos): New function.
(xpr): Call the above for a PVEC_SYMBOL_WITH_POS.
* src/lisp.h (several macros): Put parentheses around uses of parameters.
(lisp_h_BASE_EQ, BASE_EQ): New macros with the functionality of former EQ.
(lisp_h_EQ): Modify such that a symbol with position EQ the "same" bare
symbol.
(#define EQ, #define SYMBOLP): Comment out.
* src/alloc.c (macro_XPNTR, valid_lisp_object_p, mark_char_table): Replace
SYMBOLP with BARE_SYMBOLP in places where the bit pattern, not the meaning, is
important.
* src/lread.c ("read-positiong-symbols"): Correct the spelling to
"read-positionINg-symbols".
* src/print.c (print_preprocess, print_object): Use BASE_EQ rather than EQ to
avoid unwanted equivalence of a symbol with pos and its base symbol.
* lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): New variable.
(byte-compile--first-symbol, byte-compile--warning-source-offset): New
functions.
(byte-compile-warning-prefix): Amend to use also the new source position
strategy.
(byte-compile-warn): Substitute bare symbols for symbols with position before
printing them.
(byte-compile--warn-x): New function.
(compile-defun, byte-compile-from-buffer): Call read-positiong-symbols rather
than plain read when symbols-with-pos-enabled is non-nil.
(byte-compile-form): Bind byte-compile--form-stack to itself with the current
`form' pushed onto it. This will supply position information for warning
messages.
(Many functions): Replace byte-compile-warn with byte-compile--warn-x.