Consider -Wconversion warnings
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- cpp
- 領域
- build-system
調査の方向性
Start by reproducing the reported build with clang++ and the -Wconversion flags from the M1mac README. Inspect the warnings, including the example in Rcpp/sugar/functions/mean.h, and determine the agreed scope; done means the project has a documented decision and the selected warnings are resolved or intentionally excluded.
索引モデルが issue の本文から書いたものです。
説明
Enabling -Wconversion (particularly with clang++ as on the M1mac machine at CRAN, see its README) exposes a number of warnings. The Oxford machine uses clang++-21, on Ubuntu 26.04 we also have clang++-22 which Vienna uses (without the same options). Per the README this uses
CFLAGS="-falign-functions=8 -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -Wstrict-prototypes"
C17FLAGS="-falign-functions=8 -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion -Wno-strict-prototypes"
# ...
CXXFLAGS="-g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion"
Note that this turns 'sign-conversion' warnings off. Those account for a ton. I found first set of changes we could make by not doing this i.e. by running with only -Wconversion. That may be too radical, but it could still hide some overflows.
Also, our own compilation is 'clean' under -Wconversion -Wno-sign-conversion however other package may see
In file included from /Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/functions.h:63:
/Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/mean.h:38:14: warning: implicit conversion from 'R_xlen_t' (aka 'long') to 'long double' may lose precision [-Wimplicit-int-float-conversion]
38 | s /= n;
| ~~ ^
/Users/ripley/R/Library/Rcpp/include/Rcpp/sugar/functions/mean.h:44:20: warning: implicit conversion from 'R_xlen_t' (aka 'long') to 'long double' may lose precision [-Wimplicit-int-float-conversion]
44 | s += t/n;
| ~^
- 主要言語
- C++
- スター
- 799
- フォーク
- 219
- 平均マージ
- 5時間 13分
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RcppCore/Rcpp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
autowarefoundation/autoware_universe#13413 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
automated-analysis bug memory-safety
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gazebosim/gz-sensors#662 · コメント 1 件 ·