読者です 読者をやめる 読者になる 読者になる

GCCのWarning Optionをあるだけ列挙

Programming C
#ERR = -Werror
OPT = -ansi -pedantic-errors $(ERR) -Wall -Wextra -Wformat=2 -Winit-self -Wswitch-default -Wswitch-enum -Wsync-nand -Wstrict-aliasing=1 -Wstrict-overflow=5 -Wsystem-headers -Wfloat-equal -Wtraditional-conversion -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wbad-function-cast -Wc++-compat -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wsign-conversion -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Wpadded -Wredundant-decls -Wnested-externs -Winline -Winvalid-pch -Wdisabled-optimization -Wstack-protector -Woverlength-strings
# -Wtraditional
# -Wundef

# -Wunsuffixed-float-constants
# -Wlarger-than=***
# -Wframe-larger-than=***
# -Wnormalized=<none|id|nfc|nfkc>

使えなかったり、イラっときたものから少しずつ消すのもアリだと思う。

また最低限、-Wall -Wextra -Wwrite-strings、くらいはあっていいと思う。