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?= 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. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 9c2cb14173..7c12b9e5fb 100644 --- a/configure.ac +++ b/configure.ac @@ -576,6 +576,13 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"], 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 v1.2.3