gpt4 book ai didi

GCC 预处理器删除注释

转载 作者:行者123 更新时间:2023-12-04 21:05:54 26 4
gpt4 key购买 nike

是否可以指示 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com