This is the mail archive of the gcc@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]

Re: Adoption of C subset standards


On 9 January 2017 at 14:15, Nathan Sidwell wrote:
> On 01/09/2017 08:58 AM, David Brown wrote:
>
>> I don't know about CERT-C, but one of the challenges of implementing
>> MISRA coding standards checking in gcc is that the MISRA documents are
>> not free.  They are cheap (about $10, I think), but since they are not
>> free there are likely to be copyright complications.  I think it would
>> be difficult for gcc to have a warning that rejects non-zero octal
>> constants with the message "MISRA Rule 7.1: Octal constants shall not be
>> used", even though it should be fairly straightforward (and highly
>> desirable) for gcc to have a warning on the use of non-zero octal
>> constants.
>
>
> Well, there are the effective-c++ warnings that come from Scott Meyers'
> (non-zero-cost) books.  so it must be possible to do something:
>
> @item -Weffc++ @r{(C++ and Objective-C++ only)}
> @opindex Weffc++
> @opindex Wno-effc++
> Warn about violations of the following style guidelines from Scott Meyers'
> @cite{Effective C++} series of books:

That warning needs a lot of improvement, or should be deprecated. It
only warns about the guidelines in the first edition, many of which
were improved or replaced entirely in later books. Some are completely
inappropriate for C++11 and later.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]