![]() |
![]() |
4825 | ![]() |
||||
![]() | |||||||
| Annotations | |||||||
Annotations should be terminated by:
'*/' if the annotation is in a c-style comment, or'//' if the annotation is to be followed by another c++-style comment.
// PRQA S 100 A1
// OK - a new line terminates the annoation
// PRQA S 100 A1 // OK - followed by // denoting a new C++ style comment
/* PRQA S 100 A1 */ // OK - followed by */ denoting the end of the C style comment
After QA C++ has parsed an annotation, an error will be produced if
there are any tokens remaining. This ensures that QA C++ doesn't
silently ignore ill-formed annotations.
Example:
// PRQA L:L1 L2 ++ // ERROR - '+' character not expected
// PRQA S Msg A1-B1 // ERROR - "A" is not expected
For the last example, the QA C++ parses the annotation as PRQA S
Msg. The message is therefore generated against 'A' as being
the unexpected character. It is likely that an attempt was made to
specify a range of locations, something that is not valid suppression
syntax.
No MISRA C:2012 Rules applicable to message 4825
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |