Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly request -Wvla to prevent backsliding #6274

Merged
merged 6 commits into from
Jul 19, 2024
Merged

Conversation

MichaelChirico
Copy link
Member

Follow-up to #6270.

IIUC, per here, we could also make this by supplying -pedantic-errors (instead of/in addition to -pedantic which we do already?).

I tried to find similar docs for clang/llvm but IME finding docs for compiler warnings is rarely fruitful...

@ben-schwen
Copy link
Member

LGTM, but we should remove VLA before as in e.g.

int TMP[my_n]; // on stack fine since my_n is very small (<=256)

int my_gs[ngrp];

@MichaelChirico
Copy link
Member Author

Good point. There were a few others too. Now passing R CMD check under -Wvla. PTAL -- in particular on how TMP is free()'d in forder, I wasn't 100% confident there, could use the extra eyes.

Copy link

Comparison Plot

Generated via commit 712d64f

Download link for the artifact containing the test results: ↓ atime-results.zip

Time taken to finish the standard R installation steps: 11 minutes and 49 seconds

Time taken to run atime::atime_pkg on the tests: 3 minutes and 20 seconds

@MichaelChirico MichaelChirico merged commit 069eed9 into master Jul 19, 2024
4 of 5 checks passed
@MichaelChirico MichaelChirico deleted the glci-vla branch July 19, 2024 19:43
@ben-schwen
Copy link
Member

CI is now complaining about these flags in:

  • lin-dev-clang-cran
  • lin-dev-gcc-strict-cran
  • lin-rel-cran
Compilation used the following non-portable flag(s):
  ‘-Wvla’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants