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: pragma expansion patch


\
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


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