Skip to content

Fix warning variable length arrays in C++ are a Clang extension#8

Merged
marchdf merged 5 commits intomainfrom
fix-vla
Oct 28, 2025
Merged

Fix warning variable length arrays in C++ are a Clang extension#8
marchdf merged 5 commits intomainfrom
fix-vla

Conversation

@marchdf
Copy link
Contributor

@marchdf marchdf commented Oct 27, 2025

Don't look until #7 is merged.

@marchdf
Copy link
Contributor Author

marchdf commented Oct 27, 2025

Ok you can look now.

@marchdf
Copy link
Contributor Author

marchdf commented Oct 27, 2025

@mbkuhn are allocate_plan_copy functions ever used? I can't find anywhere in amr-wind (or anywhere on github for that matter) where they are used. Maybe in a private repo in some other thing? If they aren't used, then I might just delete them. If they are used... I am going to have to change their interface because the out will need to be returned as well.

@marchdf marchdf marked this pull request as ready for review October 27, 2025 21:12
@marchdf marchdf requested a review from mbkuhn October 27, 2025 21:12
@marchdf
Copy link
Contributor Author

marchdf commented Oct 27, 2025

Brief comment: variable length arrays are fine C99 but they are not in the C++ standard.

@mbkuhn
Copy link
Collaborator

mbkuhn commented Oct 27, 2025

@mbkuhn are allocate_plan_copy functions ever used? I can't find anywhere in amr-wind (or anywhere on github for that matter) where they are used. Maybe in a private repo in some other thing? If they aren't used, then I might just delete them. If they are used... I am going to have to change their interface because the out will need to be returned as well.

Good question. I set them up as I was developing and testing the repo, but then I think I didn't end up needing them / they weren't a good fit in the AMR-Wind interface. I think they still exist in the develop_test branch, but I can handle that myself. Feel free to remove.

@marchdf
Copy link
Contributor Author

marchdf commented Oct 28, 2025

Cool, I removed them.

@marchdf
Copy link
Contributor Author

marchdf commented Oct 28, 2025

I ran the tests and they pass. So I think we can merge.

@marchdf marchdf merged commit 5fb535e into main Oct 28, 2025
1 check passed
@marchdf marchdf deleted the fix-vla branch October 28, 2025 15:55
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