mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
all: Enable extra conversion warnings where applicable.
Add -Wdouble-promotion and -Wfloat-conversion for most ports to ban out implicit floating point conversions, and add extra Travis builds using MICROPY_FLOAT_IMPL_FLOAT to uncover warnings which weren't found previously. For the unix port -Wsign-comparison is added as well but only there since only clang supports this but gcc doesn't.
This commit is contained in:
@@ -22,12 +22,12 @@ INC += -I$(BUILD)
|
||||
ifeq ($(CROSS), 1)
|
||||
DFU = $(TOP)/tools/dfu.py
|
||||
PYDFU = $(TOP)/tools/pydfu.py
|
||||
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -fsingle-precision-constant -Wdouble-promotion
|
||||
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -fsingle-precision-constant -Wdouble-promotion -Wfloat-conversion
|
||||
CFLAGS = $(INC) -Wall -Werror -std=c99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
||||
LDFLAGS = -nostdlib -T stm32f405.ld -Map=$@.map --cref --gc-sections
|
||||
else
|
||||
LD = gcc
|
||||
CFLAGS = -m32 $(INC) -Wall -Werror -std=c99 $(COPT)
|
||||
CFLAGS = -m32 $(INC) -Wall -Werror -Wdouble-promotion -Wfloat-conversion -std=c99 $(COPT)
|
||||
LDFLAGS = -m32 -Wl,-Map=$@.map,--cref -Wl,--gc-sections
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user