lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> All feedback welcome. Thanks.
> --lhf

This is really for information only. I am not asking for any
modifications in Lua 5.2.0-rc7 sources !
But I found interesting to test whether Lua 5.2 respects the rules
defined by MISRA C [1].
MISRA (Motor Industry Software Reliability Association) has defined a
set of rules to enhance the reliability of C code. While some rules
come from common sense, many forbids perfectly valid and useful

In Green Hills compiler for MIPS (in version 4.0.1, quite old), there
is a support to check for MISRA rules conformance (each rule can be
selected individually).
In the annexed OpenOffice document, there is the result for that
compilation test.
MISRA-C 1998 has 127 rules. Lua 5.2.0 passes 79 of them (62 %), 48 fails.

The columns in the table shall be interpreted as this:
A: MISRA rule number
B: Rule importance. R means Required, A means Advisory
C: MISRA rule category
D: Test result. "Failed" alone means there are a number of warnings /
errors detected.
    If there is just one, the file / line is given. "Pass" means no error.
E: Rule description


Attachment: MISRA_Lua5.2.ods
Description: application/vnd.oasis.opendocument.spreadsheet