Hello,
There is a structure aligned by pragma pack(1). I hope non alignment accessing. I copy from structure member to local variable. it instruction is used by LDNW. But when I add relaxed_ansi compiler option, it instruction is used by LDW. Could you tell me the cause?
Best regards
- DSP: C66xx
- CCS: v5.1.1
- CGT: v7.4.2
-mv6600 --abi=eabi -g --include_path="C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.4.2/include" --relaxed_ansi --display_error_number --diag_warning=225 --diag_wrap=off
-------
#pragma pack(1)
typedef union ul_ipadrs_ipv4
{
char ucd[1];
unsigned long uldt;
char ucdt[4];
} UL_LPIPADRS_IPV4;
UL_LPIPADRS_IPV4 *up_ipadrs;
UL_LPIPADRS_IPV4 up_ip;
main()
{
up_ipadrs = &up_ip;
unsigned long ul = up_ipadrs->uldt;
}