Skip to content

Commit

Permalink
filter: Don't emit #line directive to header if noline option is set
Browse files Browse the repository at this point in the history
One place emitting a #line directive to the generated header was missed
in commit 647a92b when resolving westes#55. Fix it to respect gen_line_dirs
as well.
  • Loading branch information
tklauser committed Jan 12, 2017
1 parent e666829 commit 24d057e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ int filter_tee_header (struct filter *chain)
fprintf (to_h, "\n");

/* write a fake line number. It will get fixed by the linedir filter. */
fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
if (gen_line_dirs)
fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");

fprintf (to_h, "#undef %sIN_HEADER\n", prefix);
fprintf (to_h, "#endif /* %sHEADER_H */\n", prefix);
Expand Down

0 comments on commit 24d057e

Please sign in to comment.