Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mixed C/C++ build environment
#1
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:

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>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)