build system: do not use -std=c11, which warns all the time about irrelevant things

backup-before-using-REQUIRE
positron 1 month ago
parent 94d3b49196
commit e9962960e1
  1. 15
      Makefile.conf

@ -95,7 +95,16 @@ else ifeq ($(BUILD_FOR),Linux)
# -std=c17; for example GCC 7, which dates back from 2017 and should work
# well, does not. The 2011 standard is almost identical to the 2017 version
# anyway.
CC=gcc -std=c11 -pthread
# So here we could use -std=c11 . However when trying -std=c11 for a while
# GCC was bothering me all the time with warnings about the non-standard
# __PRETTY_FUNCTION__ , which are useless noise since we use that
# conditionally only where supported. Doing away with that, and using gnu11
# instead of c11 to silently allow GNU extension, while *not* using them
# except in conditional code when we also have a fallback alternative.
#
# If I use some unsupported C feature by mistake people will tell me
# --positron.
CC=gcc -std=gnu11 -pthread
else ifeq ($(BUILD_FOR),Darwin)
CC=clang
endif
@ -126,7 +135,9 @@ ifeq ($(BUILD_FOR),OS/390)
endif
else ifeq ($(BUILD_FOR),Linux)
ifdef WARN
CFLAGS+= -Wall -pedantic -Wstrict-aliasing=3
# I removed -pedantic from here in October 2022. See the comment
# about -std=... above.
CFLAGS+= -Wall -Wstrict-aliasing=3
else
CFLAGS+= -w
endif

Loading…
Cancel
Save