On Tue, Aug 18, 2015 at 9:46 PM, Cary Coutant wrote: >> Thanks, will make those changes. Do you recommend a different name >> for this flag like -fmake-comdat-functions-static? > > Well, the C++ ABI refers to this as "vague linkage." It may be a bit > too long or too ABI-specific, but maybe something like > -f[no-]use-vague-linkage-for-functions or > -f[no-]functions-vague-linkage? Done and patch attached. * c-family/c.opt (fvague-linkage-functions): New option. * cp/decl2.c (comdat_linkage): Implement new option. Warn when virtual comdat functions are seen. * ipa.c (function_and_variable_visibility): Check for no vague linkage. * doc/invoke.texi: Document new option. * testsuite/g++.dg/no-vague-linkage-functions-1.C: New test. > > And perhaps note in the doc that using this option may technically > break the C++ ODR, so it should be used only when you know what you're > doing. Done. Thanks Sri > > -cary