summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-04-10 10:23:17 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-04-10 16:17:30 +0900
commitd69c5326856b8e5df35688cd12c15a7cbdf89f1c (patch)
tree6dc111fa8119f63b6911f17f95186bd086536805 /configure.ac
parent75802bcff1b941818832f0145071f7ce9c843d8d (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3011
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
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],