This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: Bug in cpplib (was: Re: typos in f77 docs)


On Sat, 27 Mar 1999 17:21:14 -0500, Daniel Jacobowitz wrote:
>On Sat, Mar 27, 1999 at 01:07:30PM -0500, Zack Weinberg wrote:

>> to '@', '@ ' and '@-' to nothing, and leave all other @'s alone.  (Deleting
>> '@ ' may cause other problems, such as mysterious, inappropriate token
>> concatenation.  However, it shouldn't.)
>
>Why are macro arguments even getting this sort of escaping?  Do they
>get run through code which expects them to be escaped after they get
>substituted in?  In which case, wouldn't it be better to move some of
>the escaping code to a separate routine and not ask cpp_get_token to do
>it, allowing them never to become escaped if they don't need to be?

The parser for macro expansion uses escapes to handle corner-cases of
the rules.  `@ ' means put a space here only if required to prevent
pasting tokens.  `@-' means don't expand the identifier that follows
even if it's defined as a macro.

Long term I would like to convert macro expansion to a token-based
approach, which would remove the need for this mess.

>Just random thoughts.  Don't feel a need to answer any of that; I'm
>going to sit down with the code in a few days when my life slows down,
>and try to figure out the flow.

Good luck.  I'll be happy to answer any questions you have.  You can
also bug Per or Dave B but they're usually a lot busier than me.

zw


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