Skip to content

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

Merged
hathach merged 1 commit intohathach:masterfrom
ETCLabs:iar-compiler-error-on-src-host-usbh.c
Feb 26, 2022
Merged

The IAR compilier does not resolve references to fields in the anonym…#1353
hathach merged 1 commit intohathach:masterfrom
ETCLabs:iar-compiler-error-on-src-host-usbh.c

Conversation

@yoyopod
Copy link
Copy Markdown
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
Copy Markdown
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