Reverted to default standard to -ansi. Fixed warnings under compilation against -ansi. Code now builds and tests successfully under -std=c11 and -ansi on both clang (600.0.51) and gcc (4.9.1).
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,11 +1,15 @@
|
||||
# change notes:
|
||||
# filter out -Werror when compiling ptest. GCC chooses to warn about strange things sometimes.
|
||||
# mpc.c and mpc.h ompile will all flags below on clang and gcc with -Werror.
|
||||
# added standard flag (and reverted to -ansi, can now be changed from command line `make -STD=...`
|
||||
# to compile against various standards.
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -std=c11 -O3 -g -Werror -Wall -Wextra -Wformat=2 -Wshadow \
|
||||
-Wno-format-nonliteral -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition \
|
||||
-Wredundant-decls -Wnested-externs -Wmissing-include-dirs -Wswitch-default
|
||||
STND=-ansi
|
||||
CFLAGS = $(STND) -pedantic -O3 -g -Werror -Wall -Wextra -Wformat=2 -Wshadow -Wno-long-long \
|
||||
-Wno-overlength-strings -Wno-format-nonliteral -Wcast-align \
|
||||
-Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Wredundant-decls -Wnested-externs \
|
||||
-Wmissing-include-dirs -Wswitch-default
|
||||
|
||||
TESTS = $(wildcard tests/*.c)
|
||||
EXAMPLES = $(wildcard examples/*.c)
|
||||
|
Reference in New Issue
Block a user