[PATCH] gcc compatibility: silent -finline-limit=1234 & -finline-limit

Alp Toker alp at nuanti.com
Mon Jul 7 17:02:31 PDT 2014

On 08/07/2014 00:30, Reid Kleckner wrote:
> One alternative is to recognize the flag, but warn on it.  An easy way to do this with a poor diagnostic experience is to simply add it to our option table, don't put it into clang_ignored_f_Group, and don't check it in the driver.  Clang will emit 'warning: argument unused during compilation '-finline-limit=1234''.
> For extra credit, we could have a diagnostic like "ignoring GCC optimization tuning flag" and use that for all GCC optimization flags that don't have analogues in Clang/LLVM.

Reid, this is an *excellent* idea. Such a tablegen flag could be applied 
to this -finline-limit= flag and most of the other currently silently 
ignored ones. It was never cool that we silently ignored these and it's 
about time to change that.

Arthur, adding a Group<clang_ignored_gcc_optimization_f_Group> plus 
warning sounds like a much better use of time than trying to implement 
the feature in LLVM as I suggested, and will educate users with improved 

Incidentally, do you have any means of collecting compiler warnings 
emitted during a full rebuild of Debian? That would be pretty 
interesting, and let you remove -Werror to get things building in more 
cases without losing valuable diagnostics.


> ================
> Comment at: include/clang/Driver/Options.td:1561
> @@ -1560,2 +1560,3 @@
>   defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
> +def inline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_f_Group>;
>   defm inline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_f_Group>;
> ----------------
> This should be finline_limit_EQ.
> http://reviews.llvm.org/D4376
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

the browser experts

More information about the cfe-commits mailing list