This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: pragma expansion patch
- From: Eric Christopher <echristo at apple dot com>
- To: Paul Rubin <phr-2006 at nightsong dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Oct 2006 17:34:35 -0700
- Subject: Re: pragma expansion patch
- References: <20061010195140.5993.qmail@brouhaha.com>
\
A revised patch (still against 117181) follows. I've removed the
ChangeLog diffs from the patch and have broken them out, also per
Andrew.
Since no on else has gotten to this and I saw a couple of things I
thought I'd give you one more review.
static void
-scan_translation_unit (cpp_reader *pfile)
+scan_translation_unit (cpp_reader *pfile, bool ipad)
{
Hate to ask, but is there a reason you need the boolean as opposed to
something else?
+ {
+ putc (' ', print.outf);
+ ipad = false;
+ }
At any rate, as far as I can tell you don't need this set.
+ doesn't expect it, set this to 1 and it will always expand
regardless
+ of the -expand-pragmas option. */
+#define ALWAYS_EXPAND 0
+
Go ahead and remove the debug mode.
+#define NOPAD (pfile->state.in_directive && \
+ !pfile->state.directive_wants_padding)
+
Go ahead and just put && !pfile->state.directive_wants_padding in the
various conditionals.
As far as I can tell everything else looks fine. The last two things
were the only big ones I saw. The additional boolean seems weird, and
I'm not sure if there's a way you can handle it without changing the
interface.
Thanks for your persistence with this.
-eric