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

Prevent chipdb array type narrowing conversion issues #1450

Merged
merged 1 commit into from
Feb 1, 2025

Conversation

gsomlo
Copy link
Contributor

@gsomlo gsomlo commented Jan 31, 2025

When -Wnarrowing is enabled, compilation of generated chipdb*.bin.cc files produces a large number of messages:

"narrowing conversion of ... from ‘int’ to ‘const char’ [-Wnarrowing]"

Explicitly using uint8_t instead of char when referencing embedded chipdb arrays resolves these issues.

Suggested-by: @whitequark

Resolves issue #1449

When -Wnarrowing is enabled, compilation of generated
chipdb*.bin.cc files produces a large number of messages:

  "narrowing conversion of ... from ‘int’ to ‘const char’ [-Wnarrowing]"

Explicitly using uint8_t instead of char when referencing
embedded chipdb arrays resolves these issues.

Suggested-by: Catherine <[email protected]>
Signed-off-by: Gabriel Somlo <[email protected]>
@whitequark whitequark merged commit e4115e8 into YosysHQ:master Feb 1, 2025
8 checks passed
@gsomlo gsomlo deleted the gls-narrowing-fedora branch February 1, 2025 16:48
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