Nested structures in headers and C++ compatibility?

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 16 10:58:47 UTC 2014


On 16/10/14 12:42, Peter Dufault wrote:
> The only hack I have is to re-define the typedef to scope the type:
>
> typedef struct {
>    uint32_t index : 10;
>    uint32_t count : 10;
>    uint32_t output : 1;
> #ifdef __cplusplus
>    union SIU_tag::SIU_PCR_tag pcr;
> #else
>    union SIU_PCR_tag pcr;
> #endif
> } mpc55xx_siu_pcr_config;

This is fine for me.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list