Posts: 87
Threads: 68
Joined: Nov 2004
Reputation:
0
Suppose one wanted to ensure one's C++ code complied with the MISRA C guidelines. Would a static data member of a struct or class be permitted to be accessed by only one function or should that static member be defined at block scope? Suppose the struct/class type were a local one? Would moving the definition of the static member out of the class and directly into block scope provide any benefit?
Posts: 20
Threads: 0
Joined: Aug 2005
Reputation:
0
Not at all sure what you would want to do. AFAIK C doesn't know aynthing like "static data members of a struct", nor a class for tha matter. And why would you want to use MISRA C on C++ code, there's MISRA C++ for that. I'd guess you can write C code to be processed by a C++ compiler, if that's what you need. Other than that, maybe you could give an example.
FWIW,
Johan
<r>Johan Bezem<br/>
Email: <EMAIL email="
[email protected]">
[email protected]</EMAIL><br/>
Tel: +49 172 5463210<br/>
Web: <URL url="http://www.bezem.de/">http://www.bezem.de/</URL></r>
Posts: 632
Threads: 18
Joined: Jan 2006
Reputation:
1
We would recommend that C++ code comply with the MISRA C++ Guidelines.
Posted by and on behalf of the MISRA C Working Group