Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7744 Discussions

C compiler: missing diagnostics "invalid application of 'sizeof' to an incomplete type"

pmor
Beginner
284 Views

Sample code:

enum e3 { z2 = sizeof(enum e6) };

Invocation:

$ icc -std=c11 -pedantic -Wall -Wextra -c

Expected diagnostics:

error: invalid application of 'sizeof' to an incomplete type 'enum e3'

Actual diagnostics:

<nothing>

Version:

icc 2021.5.0 on x86-64 on Linux
0 Kudos
4 Replies
MadhuK_Intel
Moderator
262 Views

Hi,


Thanks for posting on Intel Communities.


>"Expected diagnostics:

error: invalid application of 'sizeof' to an incomplete type 'enum e3'"


Could you please let us know the standard reference based on which you are mentioning expected behavior so that we could consider your error/warning description?


Thanks & Regards,

Madhu.


MadhuK_Intel
Moderator
239 Views

Hi Pavel,

 

We have reported this issue to the concerned development team. They are looking into your issue.

 

Best Regards,

Madhu

 

MadhuK_Intel
Moderator
212 Views

Hi Pavel,

 

Not sure if you are aware of it, but the Intel C++ Classic compiler will enter "Legacy Product Support" mode signaling the end of regular updates. Please see the below article for more details.

https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.h...

 

So we suggest you try with the Intel C++ Compiler 2022 (icx) as it is working as expected when we checked it from our end.

 

Regards,

Madhu

 

MadhuK_Intel
Moderator
163 Views

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. Please post a new question if you need any additional information from Intel, as this thread will no longer be monitored.


Best regards,

Madhu


Reply