gpt4 book ai didi

gcc - 如何在 MinGW 中将错误消息控制设置为详细?

转载 作者:行者123 更新时间:2023-12-02 10:55:19 25 4
gpt4 key购买 nike

我从 gcc 手册中读到的内容 http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Output-and-Error-Message-Control.html这是命令行开关是 -gnatv .

但是在 MinGW 中使用这个开关会给出:cc1plus.exe: error: unrecognised debug output level "natv"

最佳答案

您可以使用 ...

-Wall :一些用户认为有问题的关于结构的所有警告,并且很容易避免)

激活警告:

  -Waddress   
-Warray-bounds (only with -O2)
-Wc++11-compat
-Wchar-subscripts
-Wenum-compare (in C/ObjC; this is on by default in C++)
-Wimplicit-int (C and Objective-C only)
-Wimplicit-function-declaration (C and Objective-C only)
-Wcomment
-Wformat
-Wmain (only for C/ObjC and unless -ffreestanding)
-Wmaybe-uninitialized
-Wmissing-braces (only for C/ObjC)
-Wnonnull
-Wparentheses
-Wpointer-sign
-Wreorder
-Wreturn-type
-Wsequence-point
-Wsign-compare (only in C++)
-Wstrict-aliasing
-Wstrict-overflow=1
-Wswitch
-Wtrigraphs
-Wuninitialized
-Wunknown-pragmas
-Wunused-function
-Wunused-label
-Wunused-value
-Wunused-variable
-Wvolatile-register-var

-Wextra :这会启用一些 -Wall 未启用的额外警告标志
  -Wclobbered  
-Wempty-body
-Wignored-qualifiers
-Wmissing-field-initializers
-Wmissing-parameter-type (C only)
-Wold-style-declaration (C only)
-Woverride-init
-Wsign-compare
-Wtype-limits
-Wuninitialized
-Wunused-parameter (only with -Wunused or -Wall)
-Wunused-but-set-parameter (only with -Wunused or -Wall)
*(and some more)*

GCC Warning Options 了解更多信息。

关于gcc - 如何在 MinGW 中将错误消息控制设置为详细?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14171256/

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