This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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-warningsCompiler 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.
Cheers, Manuel.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |