ruby-changes:60724
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 10 Apr 2020 16:17:50 +0900 (JST)
Subject: [ruby-changes:60724] d69c532685 (master): configuRe: suppress SunPro warning
https://git.ruby-lang.org/ruby.git/commit/?id=d69c532685 From d69c5326856b8e5df35688cd12c15a7cbdf89f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Fri, 10 Apr 2020 10:23:17 +0900 Subject: configure: suppress SunPro warning To this date there is no way for Oracle developer Studio to suppress warnings about unreachable codes (12.6 manual says it implemented __builtin_unreachable "as a no-op to C++. It might be added to C.") There is no way but globally kill the warning. diff --git a/configure.ac b/configure.ac index 9c2cb14..7c12b9e 100644 --- a/configure.ac +++ b/configure.ac @@ -576,6 +576,13 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L576 warnflags= ]) RUBY_TRY_CFLAGS(-Qunused-arguments, [RUBY_APPEND_OPTIONS(rb_cv_wsuppress_flags, -Qunused-arguments)]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ +@%:@if !(defined(__SUNPRO_C)||defined(__SUNPRO_CC)) +@%:@error not sunpro +@%:@endif],[])], [ + RUBY_TRY_CFLAGS(-erroff=E_STATEMENT_NOT_REACHED, [ + RUBY_APPEND_OPTIONS(rb_cv_warnflags, -erroff=E_STATEMENT_NOT_REACHED)])],[]) AC_ARG_WITH(compress-debug-sections, AS_HELP_STRING([--with-compress-debug-sections=type], -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/