This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: [PATCH] macro hooks


   Date: Wed, 23 Feb 2000 13:45:12 -0500
   From: Timothy Wall <twall@alum.mit.edu>

     The sb handling expects an entire conditional clause (or macro definition)
   to be contained within a single sb; if the the line above is in its own sb,
   the conditional checking reaches the end of the line's sb and complains b/c
   it hasn't seen the endif before the end of sb.  Perhaps there is a different
   way of modifying the sb contents to avoid this issue.

You do not have to modify the sb contents at all.  I don't understand
why you think you do.  Sure, the current sb handling expects an entire
macro definition to be inside an sb.  But that has nothing whatsoever
to do with the sb itself.  That only has to do with how it is being
used.  You want to store an additional flag inside the sb, but there
is no reason to do that.  The sb just holds data.

     The push and pop don't cleanly map b/c the original line is being replaced
   rather than a new line of different input inserted.

Your patch already does a push and a pop, so it already maps cleanly.
The push is done in input_scrub_include_sb and the pop is done
input_scrub_next_buffer after reading the whole sb.  This has nothing
to do with whether a line is being replaced or inserted.  A macro
definition replaces a line too; it replaces the macro call.

Ian

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