diff --git a/.appveyor.yml b/.appveyor.yml index 1477d74..d69f604 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,8 @@ version: "{build}" branches: except: - - /^(wip\/)?(travis|osx)(\-.+)?$/ + - /^ci/(?!appveyor)(/.+)?/ + - /^dependabot/(/.+)?/ environment: matrix: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9183b84 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +on: + push: + branches-ignore: + - 'ci/**' + - '!ci/gha**' + - 'dependabot/**' + pull_request: + branches: + - 'master' + +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + check-generated-files: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Regenerate files + working-directory: test + run: make maintainer-clean && make generate ECHO="$(which echo)" + - name: Check for changes + run: git diff --exit-code diff --git a/test/.gitignore b/test/.gitignore index 333c636..cbea888 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -454,4 +454,3 @@ /warn-unused-result.o /warn-unused-result.map /warn-unused-result-cpp.map -/.gitignore diff --git a/test/Makefile b/test/Makefile index d00426e..ae4a1c2 100644 --- a/test/Makefile +++ b/test/Makefile @@ -119,9 +119,22 @@ endif CLEANFILES = \ $(TESTS) \ $(TESTS:=-cpp) \ - $(TESTS:=.cpp) + $(TESTS:=.cpp) \ + $(NULL) + +GENERATED_FILES = \ + .gitignore \ + Makefile.dmc \ + Makefile.iar \ + Makefile.icl \ + Makefile.msvc \ + Makefile.pelles \ + $(NULL) -all: $(TESTS) $(CXXTESTS) .gitignore Makefile.msvc Makefile.iar Makefile.dmc +all: generate $(TESTS) $(CXXTESTS) + +.PHONY: generate +generate: $(GENERATED_FILES) %.cpp: %.c cp -a $^ $@ @@ -142,137 +155,141 @@ $(1)-cpp: $(1:=.cpp) $(CXX) $(filter-out -Werror,$(CXXFLAGS)) $(CXX_OUTPUT_FILE)$(1) $(1:=.cpp) endef +ECHO ?= echo + .gitignore: Makefile - @echo "# Generated by Makefile. Do not edit." > $@ - @$(foreach file,$(TESTS),echo -e "/$(file)\n/$(file:=.exe)\n/$(file:=.cpp)\n/$(file:=-cpp)\n/$(file:=-cpp.exe)\n/$(file:=-cpp.o)\n/$(file:=.obj)\n/$(file:=.lib)\n/$(file:=-cpp.obj)\n/$(file:=-cpp.lib)\n/$(file:=.o)\n/$(file:=.map)\n/$(file:=-cpp.map)" >> $@;) - @echo "/.gitignore" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit." > $@ + @$(foreach file,$(TESTS),$(ECHO) -e "/$(file)\n/$(file:=.exe)\n/$(file:=.cpp)\n/$(file:=-cpp)\n/$(file:=-cpp.exe)\n/$(file:=-cpp.o)\n/$(file:=.obj)\n/$(file:=.lib)\n/$(file:=-cpp.obj)\n/$(file:=-cpp.lib)\n/$(file:=.o)\n/$(file:=.map)\n/$(file:=-cpp.map)" >> $@;) Makefile.iar: Makefile - @echo -e "# Generated by Makefile. Do not edit.\r" > $@ - @echo -e "CC = \"C:\x5cProgram Files (x86)\x5cIAR Systems\x5cEmbedded Workbench 8.4\x5carm\x5cbin\x5ciccarm.exe\"\r" >> $@ - @echo -e "CXX = \x24(CC)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@ + @$(ECHO) -e "CC = \"C:\x5cProgram Files (x86)\x5cIAR Systems\x5cEmbedded Workbench 8.4\x5carm\x5cbin\x5ciccarm.exe\"\r" >> $@ + @$(ECHO) -e "CXX = \x24(CC)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "CFLAGS = --silent --remarks --warnings_are_errors\r" >> $@ - @echo -e "CXXFLAGS = --c++ \x24(CFLAGS)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "CFLAGS = --silent --remarks --warnings_are_errors\r" >> $@ + @$(ECHO) -e "CXXFLAGS = --c++ \x24(CFLAGS)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.o) $(file:=-cpp.o) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "all: \x24(TESTS)\r\n\r" >> $@ - @echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ + @$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@ + @$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ - @$(foreach file,$(TESTS),echo -e "$(file:=.o): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) --output \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.o): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) --output \x24(@) \x24(?)\r\n\r" >> $@;) + @$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.o): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) --output \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.o): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) --output \x24(@) \x24(?)\r\n\r" >> $@;) Makefile.dmc: Makefile - @echo -e "# Generated by Makefile. Do not edit.\r" > $@ - @echo -e "CC = \"dmc.exe\"\r" >> $@ - @echo -e "CXX = \x24(CC)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@ + @$(ECHO) -e "CC = \"dmc.exe\"\r" >> $@ + @$(ECHO) -e "CXX = \x24(CC)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "CFLAGS = -w -w17 -w18 -wx\r" >> $@ - @echo -e "CXXFLAGS = -wc \x24(CFLAGS)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "CFLAGS = -w -w17 -w18 -wx\r" >> $@ + @$(ECHO) -e "CXXFLAGS = -wc \x24(CFLAGS)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.exe) $(file:=-cpp.exe) $(file:=.map) $(file:=-cpp.map) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.exe) $(file:=-cpp.exe) $(file:=.map) $(file:=-cpp.map) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "all: \x24(TESTS)\r\n\r" >> $@ - @echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ + @$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@ + @$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ - @$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) -o \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) -o \x24(@) \x24(?)\r\n\r" >> $@;) + @$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) -o \x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) -o \x24(@) \x24(?)\r\n\r" >> $@;) Makefile.msvc: Makefile - @echo -e "# Generated by Makefile. Do not edit.\r" > $@ - @echo -e "CC = cl\r" >> $@ - @echo -e "CXX = \x24(CC)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@ + @$(ECHO) -e "CC = cl\r" >> $@ + @$(ECHO) -e "CXX = \x24(CC)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@ - @echo -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@ + @$(ECHO) -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "all: \x24(TESTS)\r\n\r" >> $@ - @echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ + @$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@ + @$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ - @$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;) + @$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;) Makefile.icl: Makefile - @echo -e "# Generated by Makefile. Do not edit.\r" > $@ - @echo -e "CC = icl\r" >> $@ - @echo -e "CXX = \x24(CC)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@ + @$(ECHO) -e "CC = icl\r" >> $@ + @$(ECHO) -e "CXX = \x24(CC)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@ - @echo -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "CFLAGS = /nologo /Wall /wd4464 /wd4514\r" >> $@ + @$(ECHO) -e "CXXFLAGS = \x24(CFLAGS)\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) $(file:=-cpp.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.cpp) $(file:=.obj) $(file:=.lib) $(file:=-cpp.exp) $(file:=-cpp.lib) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "all: \x24(TESTS)\r\n\r" >> $@ - @echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ + @$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@ + @$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ - @$(foreach file,$(TESTS),echo -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;) + @$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.exe): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) /Fe\x24(@) \x24(?)\r\n$(file:=.cpp): $(file:=.c)\r\n\tcopy /Y \x24(?) \x24(@) >NUL\r\n$(file:=-cpp.exe): $(file:=.cpp)\r\n\t\x24(CXX) \x24(CXXFLAGS) /Fe\x24(@) \x24(?)\r\n\r" >> $@;) Makefile.pelles: Makefile - @echo -e "# Generated by Makefile. Do not edit.\r" > $@ - @echo -e "CC = pocc\r" >> $@ - @echo -e "LD = polink\r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "# Generated by Makefile. Do not edit.\r" > $@ + @$(ECHO) -e "CC = pocc\r" >> $@ + @$(ECHO) -e "LD = polink\r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "CFLAGS = \r" >> $@ - @echo -e "LDFLAGS = \r" >> $@ - @echo -e "\r" >> $@ + @$(ECHO) -e "CFLAGS = \r" >> $@ + @$(ECHO) -e "LDFLAGS = \r" >> $@ + @$(ECHO) -e "\r" >> $@ - @echo -e "TESTS = \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "TESTS = \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ - @$(foreach file,$(TESTS),echo -e "\t$(file:=.obj) $(file:=.exe) \x5c\r" >> $@;) - @echo -e "\t\x24(NULL)\r\n\r" >> $@ + @$(ECHO) -e "CLEANFILES = \x24(TESTS) \x5c\r" >> $@ + @$(foreach file,$(TESTS),$(ECHO) -e "\t$(file:=.obj) $(file:=.exe) \x5c\r" >> $@;) + @$(ECHO) -e "\t\x24(NULL)\r\n\r" >> $@ - @echo -e "all: \x24(TESTS)\r\n\r" >> $@ - @echo -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ + @$(ECHO) -e "all: \x24(TESTS)\r\n\r" >> $@ + @$(ECHO) -e "clean:\r\n\tdel /Q \x24(CLEANFILES)\r\n\r" >> $@ - @$(foreach file,$(TESTS),echo -e "$(file:=.obj): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) $(file:=.c)\r\n\r\n$(file:=.exe): $(file:=.obj)\r\n\t\x24(LD) \x24(LDFLAGS) /OUT:$(file:=.exe) $(file:=.obj)\r\n\r" >> $@;) + @$(foreach file,$(TESTS),$(ECHO) -e "$(file:=.obj): $(file:=.c)\r\n\t\x24(CC) \x24(CFLAGS) $(file:=.c)\r\n\r\n$(file:=.exe): $(file:=.obj)\r\n\t\x24(LD) \x24(LDFLAGS) /OUT:$(file:=.exe) $(file:=.obj)\r\n\r" >> $@;) clean: rm -f $(CLEANFILES) +maintainer-clean: clean + rm -rf $(GENERATED_FILES) + .PHONY: clean all ifeq ($(notdir $(CC)), gcc) diff --git a/test/Makefile.icl b/test/Makefile.icl index a50ed64..05e0f5c 100644 --- a/test/Makefile.icl +++ b/test/Makefile.icl @@ -37,6 +37,7 @@ TESTS = \ unknown-pragmas.exe unknown-pragmas-cpp.exe \ unavailable.exe unavailable-cpp.exe \ unreachable.exe unreachable-cpp.exe \ + unused-function.exe unused-function-cpp.exe \ visibility.exe visibility-cpp.exe \ warn.exe warn-cpp.exe \ warn-unused-result.exe warn-unused-result-cpp.exe \ @@ -74,6 +75,7 @@ TESTS = \ unknown-pragmas.exe unknown-pragmas-cpp.exe \ unavailable.exe unavailable-cpp.exe \ unreachable.exe unreachable-cpp.exe \ + unused-function.exe unused-function-cpp.exe \ visibility.exe visibility-cpp.exe \ warn.exe warn-cpp.exe \ warn-unused-result.exe warn-unused-result-cpp.exe \ @@ -111,6 +113,7 @@ CLEANFILES = $(TESTS) \ unknown-pragmas.cpp unknown-pragmas.obj unknown-pragmas.lib unknown-pragmas-cpp.exp unknown-pragmas-cpp.lib \ unavailable.cpp unavailable.obj unavailable.lib unavailable-cpp.exp unavailable-cpp.lib \ unreachable.cpp unreachable.obj unreachable.lib unreachable-cpp.exp unreachable-cpp.lib \ + unused-function.cpp unused-function.obj unused-function.lib unused-function-cpp.exp unused-function-cpp.lib \ visibility.cpp visibility.obj visibility.lib visibility-cpp.exp visibility-cpp.lib \ warn.cpp warn.obj warn.lib warn-cpp.exp warn-cpp.lib \ warn-unused-result.cpp warn-unused-result.obj warn-unused-result.lib warn-unused-result-cpp.exp warn-unused-result-cpp.lib \ @@ -338,6 +341,13 @@ unreachable.cpp: unreachable.c unreachable-cpp.exe: unreachable.cpp $(CXX) $(CXXFLAGS) /Fe$(@) $(?) +unused-function.exe: unused-function.c + $(CC) $(CFLAGS) /Fe$(@) $(?) +unused-function.cpp: unused-function.c + copy /Y $(?) $(@) >NUL +unused-function-cpp.exe: unused-function.cpp + $(CXX) $(CXXFLAGS) /Fe$(@) $(?) + visibility.exe: visibility.c $(CC) $(CFLAGS) /Fe$(@) $(?) visibility.cpp: visibility.c diff --git a/test/Makefile.pelles b/test/Makefile.pelles index 0ecd1ae..d9bb5bc 100644 --- a/test/Makefile.pelles +++ b/test/Makefile.pelles @@ -9,9 +9,11 @@ TESTS = \ array-param.exe \ assume.exe \ cast.exe \ + concat.exe \ const.exe \ constant.exe \ deprecated.exe \ + empty-bases.exe \ fallthrough.exe \ flags.exe \ inline.exe \ @@ -19,6 +21,7 @@ TESTS = \ malloc.exe \ message.exe \ noinline.exe \ + no-escape.exe \ no-return.exe \ non-null.exe \ predict.exe \ @@ -30,9 +33,11 @@ TESTS = \ sentinel.exe \ static-assert.exe \ stringify.exe \ + unknown-cpp-attributes.exe \ unknown-pragmas.exe \ unavailable.exe \ unreachable.exe \ + unused-function.exe \ visibility.exe \ warn.exe \ warn-unused-result.exe \ @@ -42,9 +47,11 @@ CLEANFILES = $(TESTS) \ array-param.obj array-param.exe \ assume.obj assume.exe \ cast.obj cast.exe \ + concat.obj concat.exe \ const.obj const.exe \ constant.obj constant.exe \ deprecated.obj deprecated.exe \ + empty-bases.obj empty-bases.exe \ fallthrough.obj fallthrough.exe \ flags.obj flags.exe \ inline.obj inline.exe \ @@ -52,6 +59,7 @@ CLEANFILES = $(TESTS) \ malloc.obj malloc.exe \ message.obj message.exe \ noinline.obj noinline.exe \ + no-escape.obj no-escape.exe \ no-return.obj no-return.exe \ non-null.obj non-null.exe \ predict.obj predict.exe \ @@ -63,9 +71,11 @@ CLEANFILES = $(TESTS) \ sentinel.obj sentinel.exe \ static-assert.obj static-assert.exe \ stringify.obj stringify.exe \ + unknown-cpp-attributes.obj unknown-cpp-attributes.exe \ unknown-pragmas.obj unknown-pragmas.exe \ unavailable.obj unavailable.exe \ unreachable.obj unreachable.exe \ + unused-function.obj unused-function.exe \ visibility.obj visibility.exe \ warn.obj warn.exe \ warn-unused-result.obj warn-unused-result.exe \ @@ -94,6 +104,12 @@ cast.obj: cast.c cast.exe: cast.obj $(LD) $(LDFLAGS) /OUT:cast.exe cast.obj +concat.obj: concat.c + $(CC) $(CFLAGS) concat.c + +concat.exe: concat.obj + $(LD) $(LDFLAGS) /OUT:concat.exe concat.obj + const.obj: const.c $(CC) $(CFLAGS) const.c @@ -112,6 +128,12 @@ deprecated.obj: deprecated.c deprecated.exe: deprecated.obj $(LD) $(LDFLAGS) /OUT:deprecated.exe deprecated.obj +empty-bases.obj: empty-bases.c + $(CC) $(CFLAGS) empty-bases.c + +empty-bases.exe: empty-bases.obj + $(LD) $(LDFLAGS) /OUT:empty-bases.exe empty-bases.obj + fallthrough.obj: fallthrough.c $(CC) $(CFLAGS) fallthrough.c @@ -154,6 +176,12 @@ noinline.obj: noinline.c noinline.exe: noinline.obj $(LD) $(LDFLAGS) /OUT:noinline.exe noinline.obj +no-escape.obj: no-escape.c + $(CC) $(CFLAGS) no-escape.c + +no-escape.exe: no-escape.obj + $(LD) $(LDFLAGS) /OUT:no-escape.exe no-escape.obj + no-return.obj: no-return.c $(CC) $(CFLAGS) no-return.c @@ -220,6 +248,12 @@ stringify.obj: stringify.c stringify.exe: stringify.obj $(LD) $(LDFLAGS) /OUT:stringify.exe stringify.obj +unknown-cpp-attributes.obj: unknown-cpp-attributes.c + $(CC) $(CFLAGS) unknown-cpp-attributes.c + +unknown-cpp-attributes.exe: unknown-cpp-attributes.obj + $(LD) $(LDFLAGS) /OUT:unknown-cpp-attributes.exe unknown-cpp-attributes.obj + unknown-pragmas.obj: unknown-pragmas.c $(CC) $(CFLAGS) unknown-pragmas.c @@ -238,6 +272,12 @@ unreachable.obj: unreachable.c unreachable.exe: unreachable.obj $(LD) $(LDFLAGS) /OUT:unreachable.exe unreachable.obj +unused-function.obj: unused-function.c + $(CC) $(CFLAGS) unused-function.c + +unused-function.exe: unused-function.obj + $(LD) $(LDFLAGS) /OUT:unused-function.exe unused-function.obj + visibility.obj: visibility.c $(CC) $(CFLAGS) visibility.c