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

Specifying C language standard

freennix
Beginner
1,170 Views

Hi,

What is the option in the most recent version of Intel C++ Compiler Classic to specify the ISO/IEC 9899:2018 C language standard for purposes of checking for strict standard compliance, is it “-std=c17” or “-std=c18,” and where is this documented??  I can’t express how frustrating it is to find simple info like this in your online documentation, which IMHO is a disservice to all the Intel engineers who worked so hard on this product.

Thanks,

Austin

0 Kudos
1 Solution
AbhishekD_Intel
Moderator
1,138 Views

Hi Austin,


Thanks for reaching out to us.

To specify ISO/IEC 9899:2018 C language standard with Intel C++ Classic Compiler, please use -std=c18 or -std=iso9899:2018 flag.

For more details regarding the language standards please see the output of icc --help | grep "std=<std>" -A10


Hope this will help you to resolve your issue.



Warm Regards,

Abhishek


View solution in original post

3 Replies
AbhishekD_Intel
Moderator
1,139 Views

Hi Austin,


Thanks for reaching out to us.

To specify ISO/IEC 9899:2018 C language standard with Intel C++ Classic Compiler, please use -std=c18 or -std=iso9899:2018 flag.

For more details regarding the language standards please see the output of icc --help | grep "std=<std>" -A10


Hope this will help you to resolve your issue.



Warm Regards,

Abhishek


freennix
Beginner
1,106 Views

Perfect; thanks, Abhishek!

Was unsuccessful tracking down this info in a man page or in Intel’s online documentation on the Web and didn’t even think to try the obvious (using the --help command-line option).

All the best,
Austin

0 Kudos
Viet_H_Intel
Moderator
951 Views

This issue has been fixed in oneAPI 2021.3. We will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks,


0 Kudos
Reply