@@ -129,6 +129,8 @@ sub check_only_option {
return 1 if $arg =~ /^-W(no-?)?(address-space|bitwise|cast-to-as|cast-truncate|constant-suffix|context|decl|default-bitfield-sign|designated-init|do-while|enum-mismatch|external-function-has-definition|init-cstring|memcpy-max-count|non-pointer-null|old-initializer|one-bit-signed-bitfield|override-init-all|paren-string|ptr-subtraction-blows|return-void|sizeof-bool|sparse-all|sparse-error|transparent-union|typesign|undef|unknown-attribute)$/;
return 1 if $arg =~ /^-v(no-?)?(entry|dead)$/;
return 1 if $arg =~ /^-f(dump-ir|memcpy-max-count|diagnostic-prefix)(=\S*)?$/;
+ return 1 if $arg =~ /^-fmax-errors=unlimited$/; # don't pass it to GCC
+ return 1 if $arg =~ /^-fmax-warnings=(unlimited|[0-9]+)$/;
return 1 if $arg =~ /^-f(mem2reg|optim)(-enable|-disable|=last)?$/;
return 1 if $arg =~ /^-msize-(long|llp64)$/;
return 0;
Recognize sparse command-line options `-fmax-errors` and `-fmax-warnings` as "check" options: `-fmax-warnings` - dont pass it to CC neither with integer value, nor as 'unlimited'. `-fmax-errors` - only as 'unlimited' value to avoid 'unrecognized command-line option' GCC error which also accepts it as numeric. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com> --- cgcc | 2 ++ 1 file changed, 2 insertions(+)