This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [pph/libcpp] Allow include callback to not read the file (issue4388057)
- From: Tom Tromey <tromey at redhat dot com>
- To: dnovillo at google dot com (Diego Novillo)
- Cc: reply at codereview dot appspotmail dot com, crowl at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Apr 2011 10:20:51 -0600
- Subject: Re: [pph/libcpp] Allow include callback to not read the file (issue4388057)
- References: <20110412202845.164371DA1BE@topo.tor.corp.google.com>
>>>>> "Diego" == Diego Novillo <dnovillo@google.com> writes:
Diego> During pph processing, when we find an included file that we are going
Diego> to instantiate from an image, we don't want libcpp to stack and read
Diego> it.
Diego> I've implemented this by allowing the 'include' callback to return a
Diego> boolean value. If it returns true, then we call _cpp_stack_include.
Diego> Otherwise, the file is ignored.
Diego> Tom, I believe this is the right approach, but I'm not sure. It does
Diego> what I want, though.
It seems reasonable enough to me.
Tom