Skip to content

Explicitly request -Wvla to prevent backsliding#6274

Merged
MichaelChirico merged 6 commits intomasterfrom
glci-vla
Jul 19, 2024
Merged

Explicitly request -Wvla to prevent backsliding#6274
MichaelChirico merged 6 commits intomasterfrom
glci-vla

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.

@github-actions
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
@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’

@ben-schwen ben-schwen mentioned this pull request Dec 17, 2024
4 tasks
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