[前][次][番号順一覧][スレッド一覧]

ruby-changes:61196

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Mon, 11 May 2020 16:48:34 +0900 (JST)
Subject: [ruby-changes:61196] 4fbb344156 (master): fix sunpro pragma

https://git.ruby-lang.org/ruby.git/commit/?id=4fbb344156

From 4fbb34415659d33b479973e1fdbc71314bd810eb 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: Mon, 11 May 2020 16:40:52 +0900
Subject: fix sunpro pragma

SunPro's #pragma does_not_return(...) needs an argument.  That does not
fit the attribute syntax we employ.

diff --git a/include/ruby/internal/attr/noreturn.h b/include/ruby/internal/attr/noreturn.h
index 9a0916c..f741167 100644
--- a/include/ruby/internal/attr/noreturn.h
+++ b/include/ruby/internal/attr/noreturn.h
@@ -20,16 +20,12 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/attr/noreturn.h#L20
  *             extension libraries. They could be written in C++98.
  * @brief      Defines #RBIMPL_ATTR_NORETURN.
  */
-#include "ruby/internal/compiler_since.h"
 #include "ruby/internal/has/attribute.h"
 #include "ruby/internal/has/cpp_attribute.h"
 #include "ruby/internal/has/declspec_attribute.h"
 
 /** Wraps (or simulates) `[[noreturn]]` */
-#if RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RBIMPL_ATTR_NORETURN() _Pragma("does_not_return")
-
-#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn)
+#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn)
 # define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
 
 #elif RBIMPL_HAS_ATTRIBUTE(noreturn)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]