Re: [C++] Coding rule enforcement

2015-09-21 Thread Jason Merrill
On 09/21/2015 12:39 PM, Nathan Sidwell wrote: On 09/21/15 12:23, Jason Merrill wrote: On 09/21/2015 10:01 AM, Manuel López-Ibáñez wrote: On 21 September 2015 at 15:46, Daniel Gutson wrote: FWIW, we could make this plugin in 2 weeks (w already have static checkers as plugins for our customers

Re: [C++] Coding rule enforcement

2015-09-21 Thread Nathan Sidwell
On 09/21/15 12:23, Jason Merrill wrote: On 09/21/2015 10:01 AM, Manuel López-Ibáñez wrote: On 21 September 2015 at 15:46, Daniel Gutson wrote: FWIW, we could make this plugin in 2 weeks (w already have static checkers as plugins for our customers). I understand Nathan that you may have some d

Re: [C++] Coding rule enforcement

2015-09-21 Thread Daniel Gutson
On Mon, Sep 21, 2015 at 1:23 PM, Jason Merrill wrote: > On 09/21/2015 10:01 AM, Manuel López-Ibáñez wrote: >> >> On 21 September 2015 at 15:46, Daniel Gutson >> wrote: >>> >>> >>> FWIW, we could make this plugin in 2 weeks (w already have static >>> checkers as plugins for our customers). I under

Re: [C++] Coding rule enforcement

2015-09-21 Thread Jason Merrill
On 09/21/2015 10:01 AM, Manuel López-Ibáñez wrote: On 21 September 2015 at 15:46, Daniel Gutson wrote: FWIW, we could make this plugin in 2 weeks (w already have static checkers as plugins for our customers). I understand Nathan that you may have some deadlines, but if we could have the opport

Re: [C++] Coding rule enforcement

2015-09-21 Thread Manuel López-Ibáñez
On 21 September 2015 at 15:46, Daniel Gutson wrote: > > FWIW, we could make this plugin in 2 weeks (w already have static > checkers as plugins for our customers). I understand Nathan that you > may have some deadlines, but if we could have the opportunity to > implement it, we could accomplish a

Re: [C++] Coding rule enforcement

2015-09-21 Thread Daniel Gutson
On Tue, Sep 15, 2015 at 3:31 PM, Jason Merrill wrote: > On 09/15/2015 01:20 PM, Manuel López-Ibáñez wrote: >> >> On 15/09/15 15:26, Richard Biener wrote: >>> >>> On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: Jason, somme of our customers have 'interesting' C++ coding rules

Re: [C++] Coding rule enforcement

2015-09-17 Thread Ville Voutilainen
>>>+ else if (warn_multiple_inheritance) >>>+warning (OPT_Wmultiple_inheritance, >>>+ "%qT defined with multiple direct bases", ref); >>You don't need to guard the warning with a check of the warning flag; warning >>will only give the warning if the option is enabled. >the spelling

Re: [C++] Coding rule enforcement

2015-09-17 Thread Nathan Sidwell
On 09/16/15 10:23, Jason Merrill wrote: On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) +warning (OPT_Wmultiple_inheritance, + "%qT defined with multiple direct bases", ref); You don't need to guard the warning with a check of the warning fl

Re: [C++] Coding rule enforcement

2015-09-16 Thread Bernhard Reutner-Fischer
On September 16, 2015 6:32:46 PM GMT+02:00, "Manuel López-Ibáñez" wrote: >On 16/09/15 16:36, Nathan Sidwell wrote: >> On 09/16/15 10:23, Jason Merrill wrote: >>> On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) +warning (OPT_Wmultiple_inherita

Re: [C++] Coding rule enforcement

2015-09-16 Thread Manuel López-Ibáñez
On 16/09/15 16:36, Nathan Sidwell wrote: On 09/16/15 10:23, Jason Merrill wrote: On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) +warning (OPT_Wmultiple_inheritance, + "%qT defined with multiple direct bases", ref); You don't need to guard

Re: [C++] Coding rule enforcement

2015-09-16 Thread Nathan Sidwell
On 09/16/15 10:23, Jason Merrill wrote: On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) +warning (OPT_Wmultiple_inheritance, + "%qT defined with multiple direct bases", ref); You don't need to guard the warning with a check of the warning fl

Re: [C++] Coding rule enforcement

2015-09-16 Thread Jason Merrill
On 09/16/2015 08:02 AM, Nathan Sidwell wrote: + else if (warn_multiple_inheritance) + warning (OPT_Wmultiple_inheritance, +"%qT defined with multiple direct bases", ref); You don't need to guard the warning with a check of the warning flag; warning will only give the

Re: [C++] Coding rule enforcement

2015-09-16 Thread Nathan Sidwell
On 09/15/15 09:33, Jason Merrill wrote: On 09/15/2015 09:26 AM, Richard Biener wrote: Wouldn't warning flags be better so you can decide whether it's an error or a warning via -Werror=virtual-inheritance vs. -Wvirtual-inheritance? Yep. That also handles the system header exemption (unless -Ws

Re: [C++] Coding rule enforcement

2015-09-15 Thread Jason Merrill
On 09/15/2015 01:20 PM, Manuel López-Ibáñez wrote: On 15/09/15 15:26, Richard Biener wrote: On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace

Re: [C++] Coding rule enforcement

2015-09-15 Thread Manuel López-Ibáñez
On 15/09/15 15:26, Richard Biener wrote: On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace definitions 2) template declarations 3) multiple inh

Re: [C++] Coding rule enforcement

2015-09-15 Thread Jason Merrill
On 09/15/2015 09:26 AM, Richard Biener wrote: Wouldn't warning flags be better so you can decide whether it's an error or a warning via -Werror=virtual-inheritance vs. -Wvirtual-inheritance? Yep. That also handles the system header exemption (unless -Wsystem-headers). Jason

Re: [C++] Coding rule enforcement

2015-09-15 Thread Nathan Sidwell
On 09/15/15 09:26, Richard Biener wrote: Wouldn't warning flags be better so you can decide whether it's an error or a warning via -Werror=virtual-inheritance vs. -Wvirtual-inheritance? I agree. I didn't know of the -Werror=FOO trick to make them individually errors. nathan

Re: [C++] Coding rule enforcement

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: > Jason, > somme of our customers have 'interesting' C++ coding rules, they'd like to > have the compiler enforced. They want to disable: > > 1) namespace definitions > 2) template declarations > 3) multiple inheritance > 4) virtual inheritan

[C++] Coding rule enforcement

2015-09-15 Thread Nathan Sidwell
Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace definitions 2) template declarations 3) multiple inheritance 4) virtual inheritance But they want to use the STL. This patch implements 4 new flags