From e65c0342d24f04ffb29fc8789a6c44e1daec529a Mon Sep 17 00:00:00 2001 From: ydah Date: Fri, 9 Aug 2024 22:34:56 +0900 Subject: [PATCH] Fix a clang warning for treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated ``` clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] ``` --- spec/lrama/integration_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lrama/integration_spec.rb b/spec/lrama/integration_spec.rb index 5c296fad..23385d78 100644 --- a/spec/lrama/integration_spec.rb +++ b/spec/lrama/integration_spec.rb @@ -12,7 +12,7 @@ def exec_command(command) end def compiler - ENV['COMPILER'] || "gcc" + ENV['COMPILER'] || "g++" end def file_extension @@ -270,7 +270,7 @@ def generate_object(grammar_file_path, c_path, obj_path, command_args: []) end describe "sample files" do - let(:c_path) { Dir.tmpdir + "/test.c" } + let(:c_path) { Dir.tmpdir + "/test#{file_extension}" } let(:obj_path) { Dir.tmpdir + "/test" } describe "calc.y" do