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

use flexible arrays #696

Merged
merged 1 commit into from
Dec 6, 2021
Merged

use flexible arrays #696

merged 1 commit into from
Dec 6, 2021

Conversation

roblatham00
Copy link
Contributor

@roblatham00 roblatham00 commented Dec 1, 2021

newer gcc-11 will complain about overrunning arrays if we don't use the
C99 standard "flexible array" notation

Description

the 'tinyexpr' library used an old school "grow this last member of a struct" approach. gcc-11 flags that as an array overrun.

Motivation and Context

Since Unify build with Werror (we can talk more about that later...), when I build with gcc-11 the array overrun warnings cause the build to fail

How Has This Been Tested?

Tested on my laptop.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Testing (addition of new tests or update to current tests)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the UnifyFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted.

newer gcc-11 will complain about overrunning arrays if we don't use the
C99 standard "flexible array" notation
Copy link
Collaborator

@MichaelBrim MichaelBrim left a comment

Choose a reason for hiding this comment

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

Thanks Rob.

@adammoody adammoody merged commit 1413000 into LLNL:dev Dec 6, 2021
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.

4 participants