Рекомендуемые параметры предупреждения gcc для C

По состоянию на 01.09.2011, с compile-error версией gcc 4.6.1

Мой текущий gcc псевдоним "разработки"

gcc -std=c89 -pedantic -Wall \
    -Wno-missing-braces -Wextra -Wno-missing-field-initializers -Wformat=2 \
    -Wswitch-default -Wswitch-enum -Wcast-align -Wpointer-arith \
    -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline \
    -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code \
    -Wlogical-op -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \
    -Wold-style-definition -Werror \
    -ggdb3 \
    -O0 \
    -fno-omit-frame-pointer -ffloat-store -fno-common -fstrict-aliasing \
    -lm

Псевдоним compiler-error "выпуска"

gcc -std=c89 -pedantic -O3 -DNDEBUG -flto -lm

По состоянию на compile-error 3 ноября 2009 г.

псевдоним compile-errors "разработка"

gcc -Wall -Wextra -Wformat=2 -Wswitch-default -Wcast-align -Wpointer-arith \
    -Wbad-function-cast -Wstrict-prototypes -Winline -Wundef -Wnested-externs \
    -Wcast-qual -Wshadow -Wwrite-strings -Wconversion -Wunreachable-code \
    -Wstrict-aliasing=2 -ffloat-store -fno-common -fstrict-aliasing \
    -lm -std=c89 -pedantic -O0 -ggdb3 -pg --coverage

псевдоним "выпуска"

gcc -lm -std=c89 -pedantic -O3 -DNDEBUG --combine -fwhole-program -funroll-loops

c

gcc

compiler-errors

2022-11-08T17:16:53+00:00
Вопросы с похожей тематикой, как у вопроса:

Рекомендуемые параметры предупреждения gcc для C