This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery


> The C testcase is undefined.
>
>    pf = malloc (sizeof(float));
>    pi = (int *)pf;
>
>    *pf = 1.0;
>    *pi = 0;

Of course, that's the whole point of TYPE_REF_CAN_ALIAS_ALL, i.e. to flag when 
strict aliasing is violated, instead of relying on -fno-strict-aliasing.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]