[llvm-dev] bug is APFloat assignment
Davis, Alan via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 16 13:09:08 PDT 2018
I guess that makes sense. What I was trying to do was have an APFloat as a member of my target-specific MCParsedAsmOperand class. I'm not sure why that's a union instead of a normal class hierarchy, but oh well. Another hurdle cleared; thanks for the help.
-Alan
-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com]
Sent: Tuesday, October 16, 2018 2:54 PM
To: Davis, Alan
Cc: Eli Friedman; LLVM Developers Mailing List
Subject: Re: [llvm-dev] [EXTERNAL] Re: bug is APFloat assignment
On Tue, 16 Oct 2018 at 12:43, Davis, Alan via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I still think it’s a bug, but fairly easy to avoid: either properly construct APF2, or avoid assignment.
It's an issue that's intrinsic to how unions interact with
constructors, I think. The standard even mentions it:
"Note: In general, one must use explicit destructor calls and
placement new-expression to change the active member of a union."
Cheers.
Tim.
More information about the llvm-dev
mailing list