pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

R-4.6.1/src/include/R_ext/Error.h



The commit (of myself)
  https://mail-index.netbsd.org/pkgsrc-changes/2025/03/02/msg318732.html
may not be correct, or
  math/R/patches/patch-src_include_R__ext_Error.h
is not correct for now,

The file
  thinkc-01@makoto 06:29:08/260703(..work/R-4.6.1)% pwd
  /tmp/math/R/work/R-4.6.1

  thinkc-01@makoto 06:28:57/260703(..work/R-4.6.1)% cat -n src/include/R_ext/Error.h | sed -n '35,54p'
    35  /*
    36   * As this is sometimes an attribute, it should precede 'static' in a
    37   * function declaration.
    38   * gcc 15 requires it to precede 'attribute_hidden'.
    39   * OTOH, '_Noreturn' is an obsolescent (in C23) function specifier.
    40   */
    41  #if defined NORET
    42  #elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202301L) || \
    43        (defined(__cplusplus) && __cplusplus >= 201103L)
    44  // gcc 15 LLVM clang 19- and Apple clang 17
|   45  # define NORET [[noreturn]]
    46  #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201102L
    47  # define NORET _Noreturn
    48  #elif defined(__GNUC__) && __GNUC__ >= 3
    49  // All platforms these days should be using C >= 11 but perhaps used for C++
    50  # define NORET __attribute__((noreturn))
    51  #else
    52  // C++ and legacy
    53  # define NORET
    54  #endif

The line 45 among above:

    45  # define NORET [[noreturn]]
is takeen by 21.6.0 Darwin, clang
    Apple clang version 14.0.0 (clang-1400.0.29.202)
(I'm not so sure for this)

But This Darwin case the definition should be
    # define NORET __attribute__((noreturn))

Because of this, (at least)
    devel/R-Rcpp  (1.1.1.1)
could not be packaged on Darwin for the moment

I'll take a look more, but if anybody who knows better, please
fix this issue, thanks,

I'm afraid gcc-7.5.0 (on NetBSD/amd 9.4) suffers from this also,
but it is warning level for now, and packaging can be done ;-(
-- 
藤原  誠 (Makoto Fujiwara)
-- 
Makoto Fujiwara
mef%NetBSD.org@localhost
makoto%if.t.u-tokyo.ac.jp@localhost



Home | Main Index | Thread Index | Old Index