How to remove lines added by default by the C preprocessor to the top of the output?

前端 未结 1 1328
囚心锁ツ
囚心锁ツ 2020-12-18 18:18

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         


        
相关标签:
1条回答
  • 2020-12-18 18:58

    If you're using the gcc preprocessor:

       -P  Inhibit generation of linemarkers in the output from the
           preprocessor.  This might be useful when running the preprocessor
           on something that is not C code, and will be sent to a program
           which might be confused by the linemarkers.
    

    from gcc cpp man page

    0 讨论(0)
提交回复
热议问题