Other question about pointer to void

6.11 Pointer Type Conversions

Moderators: misra-c, david ward

Locked
fwamolina
Posts: 8
Joined: Tue May 30, 2006 1:42 pm
Location: Argentine

Other question about pointer to void

Post by fwamolina » Wed Feb 07, 2007 8:48 pm

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: Select all

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.
Embedded System

misra-c
Posts: 566
Joined: Thu Jan 05, 2006 1:11 pm

Post by misra-c » Wed May 09, 2007 4:02 pm

Your example is compliant.
---
Posted by and on behalf of
the MISRA C Working Group

Locked

Return to “6.11 Pointer Type Conversions”