Skip to content

Fixing compiler warning about VLA (Clang extension) - #3769

Merged
paulromano merged 1 commit into
openmc-dev:developfrom
andrsd:vla-fix
Feb 4, 2026
Merged

paulromano merged 1 commit into
openmc-dev:developfrom
andrsd:vla-fix

Conversation

@andrsd

@andrsd andrsd commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Description

Variable-length arrays are a C construct. clang supports that as a non-standard extension. This changes the code to use std::vector instead.

I noticed that this warning started to pop up when we migrated to clang-20.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andrsd!

@paulromano
paulromano merged commit a22238e into openmc-dev:develop Feb 4, 2026
17 checks passed
@andrsd

andrsd commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @andrsd!

YW. Thanks for the merge! o7

@andrsd
andrsd deleted the vla-fix branch February 5, 2026 13:24
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants