zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 20b2457388c924ec01cc6ea9d5331edbf27176ff (tree)
parent d27ef1aaef8ac12801ba4e6c2ed748c7151096a7
Author: Michael Dusan <michael.dusan@gmail.com>
Date:   Sun, 12 Apr 2020 01:03:27 -0400

only use `-nostdinc++` on c++ files

This is a follow-up to d27ef1aaef8ac12801ba4e6c2ed748c7151096a7
and avoids compiler warnings:

    warning: argument unused during compilation: '-nostdinc++'

Diffstat:
Msrc/codegen.cpp | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/codegen.cpp b/src/codegen.cpp @@ -9252,7 +9252,9 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &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) {