Skip to content

Commit f791dff

Browse files
committed
Fix CRAN pre-test issues: VLA warnings, obsolete C++11, bump to v1.1.1
- Replace C++ variable length arrays with std::vector<double> (3 sites) - Remove CXX_STD=CXX11 from Makevars/Makevars.win and C++11 from SystemRequirements - Remove LAPACK/BLAS double-link flags from Makevars (macOS Abort trap fix) - Update cran-comments.md with resubmission notes
1 parent d35e640 commit f791dff

6 files changed

Lines changed: 27 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: seroreconstruct
22
Type: Package
33
Title: Reconstructing Antibody Dynamics to Estimate the Risk of Influenza Virus Infection
4-
Version: 1.1.0
4+
Version: 1.1.1
55
Authors@R:
66
c(person(given = "Tim",
77
family = "Tsang",
@@ -34,5 +34,5 @@ Suggests:
3434
rmarkdown
3535
Config/testthat/edition: 3
3636
VignetteBuilder: knitr
37-
SystemRequirements: C++11, TBB
37+
SystemRequirements: TBB
3838
RoxygenNote: 7.3.3

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# seroreconstruct 1.1.1
2+
3+
## Bug fixes
4+
5+
* Fixed variable length array (VLA) warnings in C++ code flagged by GCC 14
6+
on Windows (`-Wvla`). Replaced with `std::vector<double>`.
7+
8+
* Removed obsolete `CXX_STD = CXX11` from Makevars files and
9+
`SystemRequirements` — the default C++ standard is sufficient.
10+
11+
---
12+
113
# seroreconstruct 1.1.0
214

315
## New features

cran-comments.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# CRAN submission comments — seroreconstruct 1.1.0
1+
# CRAN submission comments — seroreconstruct 1.1.1
2+
3+
## Resubmission
4+
5+
This is a resubmission addressing CRAN pre-test feedback on v1.1.0:
6+
7+
- **Fixed**: Variable Length Arrays (VLA) in C++ replaced with `std::vector<double>` (3 occurrences in `mcmc_function.cpp`). This resolves the `-Wvla` warning on Windows/GCC.
8+
- **Fixed**: Removed obsolete `CXX_STD = CXX11` from `Makevars` and `Makevars.win`, and removed `C++11` from `SystemRequirements`. The package compiles fine under the default C++ standard.
9+
- **Noted**: "Misspelled" words (HAI, Tsang, et, al, titer) are all correct — HAI is a standard immunology abbreviation (hemagglutination inhibition), titer is the standard US English spelling, and Tsang et al. is an author citation.
210

311
## R CMD check results
412

src/Makevars

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
CXX_STD = CXX11
2-
PKG_LIBS = `"$(R_HOME)/bin/Rscript" -e "RcppParallel::RcppParallelLibs()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
1+
PKG_LIBS = `"$(R_HOME)/bin/Rscript" -e "RcppParallel::RcppParallelLibs()"`

src/Makevars.win

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
CXX_STD = CXX11
21
PKG_CXXFLAGS = -DRCPP_PARALLEL_USE_TBB=1
32
PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::RcppParallelLibs()") $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

src/mcmc_function.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ double proratio=0;
509509
if (ifupdate[1]==1){
510510
int problength=data111(b1,4);
511511

512-
double prob[problength];
512+
std::vector<double> prob(problength);
513513
double totalprob=0;
514514

515515
for (b2=problength-1;b2>=data111(b1,3);--b2){
@@ -863,7 +863,7 @@ data21pro(b1,6)=R::rgamma(para[19+4*(data11(b1,13))+2*data11(b1,14)],1.0);
863863
// infection time
864864
int problength=data111(b1,4);
865865

866-
double prob[problength];
866+
std::vector<double> prob(problength);
867867
double totalprob=0;
868868

869869
for (b2=problength-1;b2>=data111(b1,3);--b2){
@@ -1084,7 +1084,7 @@ data21pro(b1,6)=R::rgamma(para[19+4*(data11(b1,13))+2*data11(b1,14)],1.0);
10841084
// infection time
10851085
int problength=data111(b1,4);
10861086

1087-
double prob[problength];
1087+
std::vector<double> prob(problength);
10881088
double totalprob=0;
10891089

10901090
for (b2=problength-1;b2>=data111(b1,3);--b2){

0 commit comments

Comments
 (0)