[llvm-commits] [llvm] r139581 - in /llvm/trunk/lib/CodeGen: LiveRangeCalc.cpp LiveRangeCalc.h
dblaikie at gmail.com
Tue Sep 13 12:02:38 CDT 2011
On Tue, Sep 13, 2011 at 2:29 AM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:
> 2011/9/13 David Blaikie <dblaikie at gmail.com>:
> >> + LiveOut[MBB] = LiveOutPair(VNI, (MachineDomTreeNode *)0);
> > That's kind of strange - why's the cast necessary here? (what error do
> > get on MSVC)
> It was "error C2439" and "C2440".
> Ask to google, "C2440 std::pair null".
> It might be happier if DataTypes.h would provide "nullptr"...
Ah, right, of course - yeah, we could potentially conditionally make a macro
version of nullptr (or we could use a custom macro name that resolves to
nullptr under 0x/MSVC) in non-MSVC environments that's 0 (or, better, __null
under libs that provide __null, and then 0 elsewhere)).
But it looks like MSVC's STL headers do have a _HAS_CXX0X macro that can be
defined to 0 to, notionally, remove C++0x features - but it doesn't seem to
remove this particular constructor, which is a pity. & I can't find any
other options/switches/arguments to turn off C++0x in MSVC.
Could you file a bug on this on Microsoft Connect?
[& while I'm mentioning it - I seem to recall one of the "MSVC
compatibility" changes to Clang say that MSVC's <string> doesn't compile
without MSVC's one-phase name lookup hackery. I'll bet that they'd be
interested in fixing that, on principle - worth a try reporting it too]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits