Displaying 4 results from an estimated 4 matches for "cc77".
Did you mean:
c77
2018 Aug 14
3
GCC 5 and -Wstrict-aliasing in JSON.h
...pe passed in is a union, why not simply take the union member of
the appropriate type?
I don't think that GCC would produce this warning unnecessarily. You
are in dangerous waters.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
2018 Aug 10
4
GCC 5 and -Wstrict-aliasing in JSON.h
在 2018-08-10 06:20, Kim Gräsman 写道:
> On Fri, Aug 10, 2018 at 12:02 AM, Jonathan Wakely <jwakely.gcc at gmail.com>
> wrote:
>>
>> If GCC 4.9.3 thinks there's an aliasing violation it might
>> misoptimise. It doesn't matter if it's right or not, it matters if it
>> treats the code as undefined or not.
>>
>> And apparently GCC does think
2018 Aug 10
2
GCC 5 and -Wstrict-aliasing in JSON.h
...rk, unless the object
> stored in the memory at that address was stored as the union type.
>
> Do not lie to the compiler or it will get its revenge.
>
> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <https://www.redhat.com>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180810/ba826ae9/attachment.html>
2018 Aug 12
4
GCC 5 and -Wstrict-aliasing in JSON.h
I did some more extensive testing and found that all GCCs older than 7
trigger the warning, but only if CMAKE_BUILD_TYPE=Release (which I
guess indicates optimizations are enabled).
There's a patch up for disabling the warning here:
https://reviews.llvm.org/D50607.
I still feel a little uncomfortable, because I think Jonathan makes an
excellent point -- if GCC thinks there's a