Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 16-0-1 and extern "C"
#1
Hello,
if we want to use the same Header files for "C" and "C++" we must use the "extern C" constuct. But the "extern C" construct must be placed before the include of the Header and so our tool reports a MISRA 16-0-1 violation. Is this violation valid? And if so, is there an other solution?

Code:
#ifndef _MYHEADER_
#define _MYHEADER_

extern "C"
{
    #include "firstheader.h"                // MISRA 16-0-1 violation
}

Thank you for help,
Stefan
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)