-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Sergey Poznyakoff on 5/24/2007 2:34 AM: > Hello,
Hello Sergey, > > When outputting comment blocks, m4 inserts line synchronisation > directives into them and this makes compilers get out of sync when > reporting diagnostics. For example, given this input: > > -- sample begin -- > changecom(/*,*/) > /* line 1 > line 2 > */ > TEXT > -- sample end -- > > m4 -s produces the following: > > -- output begin -- > #line 1 "sample.m4" > > #line 4 > /* line 1 > #line 4 > line 2 > #line 4 > */ > TEXT > -- output end -- > > which expands the comment by two lines and forces compiler to believe that > the word `TEXT' appears at the line 9 (instead of the line 5). Thanks for the report and analysis. I agree that a comment is a single token (even if it occupies multiple lines), and therefore, only a single line directive should be issued at the start of the comment instead of repeating the same directive for each line of the comment. Would you mind signing copyright papers, as this patch is not trivial? Also, can you add mention of this to NEWS and documentation (including a test case) to m4.texi? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVYF784KuGfSFAYARAmFnAJ4gJ5tee4z3IXVF2RvHkL8Lb5NyVgCg2SnT steKm5WD2QlrOq9zQD5U1yU= =tC3/ -----END PGP SIGNATURE----- _______________________________________________ Bug-m4 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-m4
