Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Himanshu2
Beginner
202 Views

What is the equivalent of '#pragma GCC system_header' for icc?

Jump to solution

I want icc to not give any warnings for a particular header file. For gcc/clang #pragma GCC system_header tells the compiler to treat a file as a system header and ignore all the warnings.

I am aware of the option to disable warnings selectively, but there are way too many warnings because the header files are very old.

Thanks

0 Kudos

Accepted Solutions
Himanshu2
Beginner
55 Views

I have attached a minimum working example. 

I tested it on two different versions of icc, it seems like '#pragma GCC system_header' was added to icc in some version after 16.0.03.

For icc version 16.0.03, if one removes the warning codes to be ignore the above code will not compile but it will compile for icc version 19.1.2.254 because this version understands '#pragma GCC system_header'.

I am marking this issue as resolved because '#pragma GCC system_header' was added to newer versions of icc.

Thanks

View solution in original post

5 Replies
Gopika_Intel
Moderator
161 Views

Hi,

 

Thank you for posting in Intel C++ Compiler forum. We’re checking this with our team. We’ll get back to you with an answer.

 

Regards

Gopika


Gopika_Intel
Moderator
137 Views

Hi,

 

Thank you for your patience. Could you please provide us with a reproducer code so that we can try it from our end?

 

Regards

Gopika


Gopika_Intel
Moderator
118 Views

Hi,

 

We haven’t heard from you in a while. Is your query resolved? If not, could you please provide us with a reproducer code so that we can try it from our end. Let us know your updates.

 

Regards

Gopika


Himanshu2
Beginner
56 Views

I have attached a minimum working example. 

I tested it on two different versions of icc, it seems like '#pragma GCC system_header' was added to icc in some version after 16.0.03.

For icc version 16.0.03, if one removes the warning codes to be ignore the above code will not compile but it will compile for icc version 19.1.2.254 because this version understands '#pragma GCC system_header'.

I am marking this issue as resolved because '#pragma GCC system_header' was added to newer versions of icc.

Thanks

View solution in original post

Gopika_Intel
Moderator
20 Views

Hi,

Thank you for providing the information. Glad to know your query is resolved. As the query is resolved we are no longer monitoring this thread. For further queries and issues please raise a new thread. We’d be happy to help you.

Regards

Gopika