From 20b2457388c924ec01cc6ea9d5331edbf27176ff Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Sun, 12 Apr 2020 01:03:27 -0400 Subject: [PATCH] only use `-nostdinc++` on c++ files This is a follow-up to d27ef1aaef8ac12801ba4e6c2ed748c7151096a7 and avoids compiler warnings: warning: argument unused during compilation: '-nostdinc++' --- src/codegen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 6a1db495a..23ab2a130 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9252,7 +9252,9 @@ void add_cc_args(CodeGen *g, ZigList &args, const char *out_dep_pa } args.append("-nostdinc"); - args.append("-nostdinc++"); + if (source_kind == FileExtCpp) { + args.append("-nostdinc++"); + } args.append("-fno-spell-checking"); if (g->function_sections) {