diff options
| author | Ada Christine <adachristine18@gmail.com> | 2023-02-05 13:21:30 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2023-02-05 13:21:30 +0000 |
| commit | 16ac52200a768d8f0e93896ec3fa174e825f2f24 (patch) | |
| tree | 571ee64117b686c2060a2ab085f525805ab7d5ab | |
| parent | 0bfbbabeed6b53d7aa44f6df9b569e3bacb040e9 (diff) | |
fix broken
| -rw-r--r-- | api/lib/numeric.h | 13 | ||||
| -rw-r--r-- | defaults.mk | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/api/lib/numeric.h b/api/lib/numeric.h index db6c777..2b724e0 100644 --- a/api/lib/numeric.h +++ b/api/lib/numeric.h @@ -1,16 +1,17 @@ #pragma once +#pragma GCC diagnostic ignored "-Wgnu-statement-expression" #define min(x, y) \ ({ \ - typeof (x) _x = (x); \ - typeof (y) _y = (y); \ - _x > _y ? _x : _y; \ + __typeof__ (x) _x = (x); \ + __typeof__ (y) _y = (y); \ + _x < _y ? _x : _y; \ }) #define max(x, y) \ ({ \ - typeof (x) _x = (x); \ - typeof (y) _y = (y); \ - _x < _y ? _x : _y; \ + __typeof__ (x) _x = (x); \ + __typeof__ (y) _y = (y); \ + _x > _y ? _x : _y; \ }) diff --git a/defaults.mk b/defaults.mk index 2cc7ac1..73e8950 100644 --- a/defaults.mk +++ b/defaults.mk @@ -11,7 +11,7 @@ OBJCOPY := objcopy CFLAGS += -ffreestanding -mno-red-zone -ggdb -std=c2x \ -Wall -Wextra -Werror -fno-stack-protector \ - -Wpedantic + -Wpedantic -std=c2x CXXFLAGS += -ffreestanding -mno-red-zone -ggdb \ -Wall -Wextra -Werror -fno-stack-protector |
