Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

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

pmor
Beginner
548 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
509 Views

Hi,


Thanks for reporting to us.

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


Thanks and Regards,

Ditipriya.




0 Kudos
Viet_H_Intel
Moderator
464 Views

Thanks,

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


Regards.

Viet


0 Kudos
Viet_H_Intel
Moderator
377 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


0 Kudos
Reply