Been trying to add this flag: -Wshadow=compatible-local
(documentation) when compiling but it just keeps throwing this message:
`error: unknown warning option '-Wshadow=compatible-local';
did you mean '-Wshadow- uncaptured-local'?
[-Werror,-Wunknown-warning-option]`
Snippet of my makefile:
# COMPILER & FLAGS ============================================================
CC = gcc
CFLAGS = -g -std=c11 -O3 \
-Wall -Wextra -Werror \
-Wshadow -Wshadow=compatible-local \
-Wno-sign-compare \
-fsanitize=integer \
-fsanitize=undefined \
-fsanitize=address -fsanitize-address-use-after-scope
Updated:
Note: my compiler version is clang-900.0.39.2
. (It says clang
even though you type in gcc
, because I'm using macOS and well ... @Aconcagua explains why down below)
Someone know why this is happening ? and/or how to fix it ?