Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7779 Discussions

C compiler: missing diagnostics: result of ## operator is not a valid preprocessing token

pmor
Beginner
386 Views

Per C11 this leads to UB:

 

#define X . ## . ## .
X

 

Intel C compiler does not diagnose it:

 

$ icc t0.c -std=c11 -Wall -Wextra -pedantic -E
<nothing>

 

As a quality-of-implementation matter Intel C compiler should diagnose it.
Version: icc 2021.1.2 on x86-64 on Linux

0 Kudos
3 Replies
DitiD_Intel
Moderator
347 Views

Hi,


Thanks for reporting to us.

We're working on it and we'll get back to you soon.


Thanks and Regards,

Ditipriya.




Viet_H_Intel
Moderator
302 Views

Thanks,

I've reported this case to our Front End team.


Regards.

Viet


Viet_H_Intel
Moderator
215 Views

Since the classic C/C++ compilers will enter “Legacy Product Support” mode signaling the end of regular updates to the classic compiler base, and they will no longer appear in oneAPI toolkits, we will not fix this diagnostic in icc.

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


I am going to close this as "won't fix".


Regards,

Viet


Reply