- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sample code (t0.c):
struct { struct { int i; int a[]; } x; } x;
Invocation:
icc t0.c -std=c11 -pedantic -Wall -Wextra
Expected diagnostics:
structure with flexible array member shall not be a member of a structure
Actual diagnostics:
<nothing>
Version:
icc 2021.5.0 on x86-64 on Linux
C11, 6.7.2.1 Structure and union specifiers, Constraints, 3:
> A structure or union shall not contain a member with incomplete or function type (hence,
a structure shall not contain an instance of itself, but may contain a pointer to an instance
of itself), except that the last member of a structure with more than one named member
may have incomplete array type; such a structure (and any union containing, possibly
recursively, a member that is such a structure) shall not be a member of a structure or an
element of an array.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Thank you for reporting this issue to us.
We are also able to reproduce the issue with the ICC compiler from our end.
We are working on it. We will get back to you soon.
Meanwhile, could you please try with icx compiler? It is working as expected(throwing a warning) from our end with icx compiler.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have reported this issue to the development team, they are looking into this issue
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for your patience.
Not sure if you are aware of it, but the C++ Classic compiler will enter "Legacy Product Support" mode signaling the end of regular updates. Please see the below article for more details.
So we suggest you try with icx compiler (2022.0.0) as it is working as expected by throwing a warning from our end.
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The version against which you reported your issue is no longer targeted for fixes. Please check out the new versions of Intel oneAPI Toolkits for the latest features.
As It is working as expected(throwing a warning) from our end with icx compiler, we are going ahead and closing this issue.
Thanks & Regards,
Noorjahan.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page