[llvm] r238447 - AsmPrinter: Suppress warnings on GCC from r238362, NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Thu Jun 4 15:49:43 PDT 2015


> On 2015 Jun 4, at 15:09, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Thu, May 28, 2015 at 11:09 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> Author: dexonsmith
> Date: Thu May 28 13:09:13 2015
> New Revision: 238447
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=238447&view=rev
> Log:
> AsmPrinter: Suppress warnings on GCC from r238362, NFC
> 
> GCC seems to have some overzealous warnings about strict aliasing.
> Rafael reports that this patch suppresses them on GCC 4.9, and I'm
> hoping this will work for GCC 4.7 as well.  I'll watch [1] and iterate
> if necessary.
> 
> Oh, and just to check - I assume we couldn't just use a union here because (I assume?) MSVC 2013 doesn't support generalized unions of C++11?

Based on this page:
https://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.140).aspx

it doesn't look like we can.

> (& there are non-trivial things here, like DIELocList, etc)

Once we are allowed to use generalized unions, I think the types we're
using here will fit just fine.





More information about the llvm-commits mailing list