是否可以指示 GCC 预处理器在处理文件时不删除注释?
最佳答案
GCC 有 -C 选项来保留注释。
`-C'
Do not discard comments. All comments are passed through to the
output file, except for comments in processed directives, which
are deleted along with the directive.
You should be prepared for side effects when using `-C'; it causes
the preprocessor to treat comments as tokens in their own right.
For example, comments appearing at the start of what would be a
directive line have the effect of turning that line into an
ordinary source line, since the first token on the line is no
longer a `#'.
关于GCC 预处理器删除注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2208515/