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]
Other format: [Raw text]

Re: [PATCH] New pragma handling mechanism


On Apr 6, 2005 8:50 PM, Zack Weinberg <zack@codesourcery.com> wrote:
> From the point of view of the handler function, behavior has to be
> identical.  That doesn't mean that the C and C++ versions of c_lex()
> can't be doing different stuff under the hood -- C is calling down to
> cpplib on the fly, presumably, whereas C++ is fishing tokens out of
> its giant buffer.
Yes.

> However, there should still be no need for
> c_register_pragma to do anything differently.
To do this (if I've understand you correctly) a global option is
needed, like defer_pragmas. I think this is not good, because in this
case we can't have some pragmas to be handled by cpplib on the fly,
and other pragmas to be tokenized. That is why the argument to
c_register_pragma is needed.
Maybe some kind of "default pragma handling mechanism" option?

-- 
  Dmitry


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