Remove extra junk from C preprocessor?
        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:53 UTC
        
        
        Read the original article
        Hit count: 307
        
I'm trying to use the C preprocessor 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