Enable additional compile checks. #16

Open
opened 2023-11-08 20:29:19 +00:00 by jordan · 0 comments
Owner

The following GCC flags seem to be a good start to catching a lot of low-hanging fruit:

-ffast-math -fipa-profile -fipa-pta -fira-loop-pressure -fmerge-all-constants -fno-common -fstrict-aliasing -fstrict-overflow -ftree-partial-pre -funsafe-loop-optimizations -pedantic -Wall -Waggregate-return -Warray-bounds=2 -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdouble-promotion -Wendif-labels -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wframe-larger-than=256 -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wl,-O1 -Wl,--gc-sections -Wl,--as-needed -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-error=padded -Wno-error=strict-overflow -Wno-unused-parameter -Woverflow -Wpacked -Wpedantic -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-conversion -Wstack-usage=384 -Wstrict-aliasing=1 -Wstrict-overflow=5 -Wstrict-prototypes -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wswitch-default -Wswitch-enum -Wtrampolines -Wundef -Wuninitialized -Wunsafe-loop-optimizations -Wunsuffixed-float-constants -Wunused-but-set-parameter -Wunused-macros -Wvector-operation-performance -Wwrite-strings

This catches a lot of things, but most of them are really trivial to fix and generally not that big of a problem. We should still go through and fix them when applicable though.

The following GCC flags seem to be a good start to catching a lot of low-hanging fruit: ``` -ffast-math -fipa-profile -fipa-pta -fira-loop-pressure -fmerge-all-constants -fno-common -fstrict-aliasing -fstrict-overflow -ftree-partial-pre -funsafe-loop-optimizations -pedantic -Wall -Waggregate-return -Warray-bounds=2 -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdouble-promotion -Wendif-labels -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wframe-larger-than=256 -Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wl,-O1 -Wl,--gc-sections -Wl,--as-needed -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wno-error=padded -Wno-error=strict-overflow -Wno-unused-parameter -Woverflow -Wpacked -Wpedantic -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-conversion -Wstack-usage=384 -Wstrict-aliasing=1 -Wstrict-overflow=5 -Wstrict-prototypes -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wswitch-default -Wswitch-enum -Wtrampolines -Wundef -Wuninitialized -Wunsafe-loop-optimizations -Wunsuffixed-float-constants -Wunused-but-set-parameter -Wunused-macros -Wvector-operation-performance -Wwrite-strings ``` This catches a *lot* of things, but most of them are really trivial to fix and generally not that big of a problem. We should still go through and fix them when applicable though.
jordan added the
enhancement
label 2023-11-08 20:30:08 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Cytoplasm#16
No description provided.