MISRA Discussion Forums

Full Version: Other question about pointer to void
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In misraC-2004 when starts section 6.11 - Pointer type Conversion says the following:

\"Conversions involving pointer types require an explicit cast except when:
The conversion is between a pointer to object an a pointer to void....\"

my question is if this example is compliance with that.

Code:
void func (void)
{
  void*          pt_V;
  uint8_t*       pt_A;
  uint32_t*      pt_B;

  .
  .
  .

  pt_V = pt_A;

  /* use pointer */

  pt_V = pt_B;

  /* use pointer */

  .
  .
  .
}

thank you.
Your example is compliant.