From: Jason Merrill <jason@redhat.com>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>,
"Richard Biener" <richard.guenther@gmail.com>,
"Nathan Sidwell" <nathan@acm.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
David Malcolm <dmalcolm@redhat.com>
Subject: Re: [C++] Coding rule enforcement
Date: Tue, 15 Sep 2015 18:33:00 -0000 [thread overview]
Message-ID: <55F8640B.4060804@redhat.com> (raw)
In-Reply-To: <55F85357.5000101@gmail.com>
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 <nathan@acm.org> 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 inheritance
>>>
>>> But they want to use the STL. This patch implements 4 new flags,
>>> intended
>>> to be use in the -fno-FOO form. They're only active outside of system
>>> header files.
>
> If these are quite specific coding rules, wouldn't this be something
> ideal for a plugin rather than implemented in the compiler proper?
>
> One can implement warnings with plugins (in python if desired!)
>
> http://gcc-python-plugin.readthedocs.org/en/latest/basics.html#generating-custom-errors-and-warnings
>
>
> Compiler plugins that implement specific coding rules are quite common,
> alas, using clang not GCC:
> https://wiki.documentfoundation.org/Development/Clang_plugins
>
> It would be more generally useful to extend GCC to fully support this
> type of plugins.
Good point.
Jason
next prev parent reply other threads:[~2015-09-15 18:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 13:08 Nathan Sidwell
2015-09-15 13:28 ` Richard Biener
2015-09-15 13:33 ` Nathan Sidwell
2015-09-15 13:36 ` Jason Merrill
2015-09-16 12:10 ` Nathan Sidwell
2015-09-16 14:23 ` Jason Merrill
2015-09-16 14:37 ` Nathan Sidwell
2015-09-16 16:36 ` Manuel López-Ibáñez
2015-09-16 19:34 ` Bernhard Reutner-Fischer
2015-09-17 14:56 ` Nathan Sidwell
2015-09-15 17:20 ` Manuel López-Ibáñez
2015-09-15 18:33 ` Jason Merrill [this message]
2015-09-21 13:52 ` Daniel Gutson
2015-09-21 14:02 ` Manuel López-Ibáñez
2015-09-21 16:31 ` Jason Merrill
2015-09-21 16:42 ` Daniel Gutson
2015-09-21 16:57 ` Nathan Sidwell
2015-09-21 17:19 ` Jason Merrill
2015-09-17 14:58 Ville Voutilainen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F8640B.4060804@redhat.com \
--to=jason@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=lopezibanez@gmail.com \
--cc=nathan@acm.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).