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

Specifying C language standard

freennix
Beginner
581 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
549 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
550 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
517 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

Viet_H_Intel
Moderator
362 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,


Reply