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

The IAR compilier does not resolve references to fields in the anonym… #1353

Merged

Conversation

yoyopod
Copy link
Contributor

@yoyopod yoyopod commented Feb 25, 2022

…ous structs defined within the usbh_dev0_t and usbh_device_t structs as they are defined. The problem seems to relate to the placement of the 'volatile' keyword at the struct level. I fixed the problem by removing the 'volatile' from the struct level, and instead placing it on each of the field declarations within the structs.

Describe the PR
IAR compile-time errors on src/host/usbh.c are removed by reassigning 'volatile' keyword from the struct level in two anonymous structs within outer structs to the individual field names within the anonymous structs. The original placement results in the field names appearing undefined when they are referenced later in the file.

Additional context
IAR compiler error on TinyUSB volatile-anonymous in usbh c

…ous structs defined within the usbh_dev0_t and usbh_device_t structs as they are defined. The problem seems to relate to the placement of the 'volatile' keyword at the struct level. I fixed the problem by removing the 'volatile' from the struct level, and instead placing it on each of the field declarations within the structs.
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

thanks for the update, look good

@hathach hathach merged commit f392054 into hathach:master Feb 26, 2022
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