11-10-2016, 11:40 AM
Could you write an explicit chapter on how to deal with this situation in the next version of the standard?
For example, i don't think this is what MISRA intended: http://support.gimpel.com/forums/225702-...th-mixed-c
Also, consider adding exceptions to some rules in the context of headers being included in both C and C++ modules:
Thank you very much.
For example, i don't think this is what MISRA intended: http://support.gimpel.com/forums/225702-...th-mixed-c
Also, consider adding exceptions to some rules in the context of headers being included in both C and C++ modules:
Code:
#ifndef FOO_H
#define FOO_H
#define MAGIC_CONSTANT 123456/*Violates MISRA C++ Rule 16-2-2, but is fine in C and changing would require storage in C (effiency)*/
typedef int int32_t;
#ifdef __cplusplus
extern "C"
{
#endif
int32_t foo_api(void);
#ifdef __cplusplus
}
#endif
#endif
Thank you very much.
<t></t>