c++ - gcc 选项 "-fmessage-length"是什么意思?

标签 c++ c gcc compiler-construction

我正在使用 CDT(用于 c 语言的 eclipse)。我发现默认的 gcc 编译器选项是 -O0 -g3 -Wall -c -fmessage-length=0-fmessage-length是什么意思?那应该是-fflag,但是message-length呢?我在 GCC Command-Line Options 中没有找到它.感谢您的考虑。

最佳答案

I didnt find it in GCC Command-Line Options.

那是因为您正在查看 "a modified version of the Command-Line Options section of the GCC Manual."

This is the official list of all possible GCC command-line options ,这导致此部分:"3.7 Options to Control Diagnostic Messages Formatting" .这就是该部分的内容:

3.7 Options to Control Diagnostic Messages Formatting

Traditionally, diagnostic messages have been formatted irrespective of the output device's aspect (e.g. its width, ...). You can use the options described below to control the formatting algorithm for diagnostic messages, e.g. how many characters per line, how often source location information should be reported. Note that some language front ends may not honor these options.

-fmessage-length=n

Try to format error messages so that they fit on lines of about n characters. The default is 72 characters for g++ and 0 for the rest of the front ends supported by GCC. If n is zero, then no line-wrapping is done; each error message appears on a single line.

...

关于c++ - gcc 选项 "-fmessage-length"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12015624/

相关文章:

c++ - 带公历日期的 unordered_map

c++ - OSX - Qt 应用程序在接收系统事件 QEvent::FileOpen 时崩溃

c++ - 是否有更惯用的方式来拆分 std::vector?

c++ - 视觉 C++ 错误 : function must return a value

c - 在数组中使用动态内存分配时程序崩溃

c - 在 Windows 和 Linux 下如何链接到 OS C 库?

c++ - 从单独的线程发送 UDP

java - JNI 代码中的 UnsatisfiedLinkError

c - 标准 gcc 发行版中是否有环形缓冲区实现?

C++ 本地库和相对路径