This is similar to Warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated. However, the OP was trying to compile header files. In my case, I'm trying to generate dependencies:
$ git diff
diff --git a/GNUmakefile b/GNUmakefile
index 791ef05..ce48a59 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -175,6 +176,11 @@ LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
DLLTESTOBJS = dlltest.dllonly.o
+-include GNUmakefile.deps
+
+GNUmakefile.deps:
+ $(CXX) $(CXXFLAGS) -MM *.h *.cpp > GNUmakefile.deps
+
How do I use CXX
to build dependencies while avoiding the Clang warning?