[LLVMdev] Virtual Studio hack in APFloat.h

Gordon Keiser gkeiser at arxan.com
Tue Mar 18 11:34:58 PDT 2014


The comment on this says:

  /// Only 2 bits are required, but VisualStudio incorrectly sign extends it.
  /// Using the extra bit keeps it from failing under VisualStudio.
  fltCategory category : 3;

Which I don't think is correct, since the standard doesn't specify whether a pre-C++11 (untyped) enum needs to be signed or unsigned.   Specifying the enum as enum unsigned should work for VS2012, I can try this a bit later and see if it works.

-Gordon

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Pete Cooper
Sent: Tuesday, March 18, 2014 2:15 PM
To: LLVM Developers Mailing List
Subject: [LLVMdev] Virtual Studio hack in APFloat.h

Hi all

APFloat.h contains this code, which was required for Visual Studio builds.

Given that this was committed in r41784 (2007), does anyone know if newer versions work?  I think after moving to C++11 we're on VS2013 at a minimum?  I'd have hoped it would be more likely to work.

Thanks,
Pete

  /// What kind of floating point number this is.
  ///
  /// Only 2 bits are required, but VisualStudio incorrectly sign extends it.
  /// Using the extra bit keeps it from failing under VisualStudio.
  fltCategory category : 3;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140318/94e356d7/attachment.html>


More information about the llvm-dev mailing list