Alex Rivera | Logout

Is it possible to get gcc to ignore unknown -W... command line options?

Asked 2011-10-19T19:41:24.523
16

I have a build configuration that has some "-Wno" options meant to cover both 'gcc' and 'clang'. The problem is that gcc doesn't recognize some of the clang specific ones and fails to compile because of it.

Example of the error:

 error: unrecognized command line option "-Wno-self-assign"

Is there a way to tell gcc to ignore command line options that it doesn't recognize?

Edit
Report

1 Answer

-1

It turns out there is a warning unknown-warning that with -Werror becomes an error.

This can be disabled with:

-Wno-error=unknown-warning
answered 2011-10-19T19:51:52.780

Your Answer