Remove extra junk from C proprocessor?
Posted
by Brendan Long
on Stack Overflow
See other posts from Stack Overflow
or by Brendan Long
Published on 2010-06-01T01:58:23Z
Indexed on
2010/06/01
2:03 UTC
Read the original article
Hit count: 280
preprocessor
|preprocessor-abuse
I'm trying to use the C proprocessor on non-C code, and it works fine except for creating lines like this at the top:
# 1 "test.java"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.java"
The problem is that these lines aren't valid in Java. Is there any way to get the preprocessor to not write this stuff? I'd prefer not to have to run this through something else to just remove the first 4 lines every time.
© Stack Overflow or respective owner