He Jun
He Jun

Reputation: 131

How to prevent clang from turning "#warning ..." statement into error when -Werror is used?

Gcc has a compiler option -Wno-error=cpp which prevents compiler from turning "#warning ..." into error. However, clang doesn't support this option. Does clang have similar option?

Upvotes: 0

Views: 250

Answers (1)

He Jun
He Jun

Reputation: 131

Clang option -Wno-error=\#warnings is equivalent of gcc's -Wno-error=cpp. Escape \ is needed in Linux. Verified with clang-3.8 in Linux.

Upvotes: 1

Related Questions