This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: C/C++ preprocessor macro support for GDB



Instead of the bug you guessed, here's the bug I actually do have:

(gdb) show macro A
Defined at /home/jimb/gdb/macros/play/test.c:12
#define A(x) x
(gdb) show macro B
Defined at /home/jimb/gdb/macros/play/test.c:12
#define B(x) A
(gdb) macro expand B(ignored)(passed through)
expands to: A(passed through)
(gdb) 

ISO/IEC 9899:1999(E) 6.10.3.4 para 1: "Then, the resulting
preprocessing token sequence is rescanned, along with all subsequent
preprocessing tokens of the source file, for more macro names to
replace."  It's the "along with all subsequent PP tokens" part that I
got wrong.

(Did I mention that I think we should replace macroexp.c with libcpp?)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]