[LLVMdev] Compiling LLVM 2.7 with Visual Studio 2010.

Tom van Dijck llvm at tomvandijck.com
Sat May 1 22:34:26 PDT 2010


K, last one.....

Global search and replace in LLVM and Clang for NULL -> nullptr, and a
couple of locations where 0 is used instead of a nullptr, makes both
compile.

Apart from the errors I mentioned earlier about the private/public method,
and the setjmp related stuff.

Not sure if it compiles with any other compiler now, so I won't be
submitting this null->nullptr change, but the other errors might be worth
taking...

Tom.


On Sat, May 1, 2010 at 10:09 PM, Tom van Dijck <llvm at tomvandijck.com> wrote:

>
>
> On Sat, May 1, 2010 at 10:02 PM, me22 <me22.ca at gmail.com> wrote:
>
>> On 2 May 2010 00:53, Tom van Dijck <llvm at tomvandijck.com> wrote:
>> > The problem seems to be a much larger issue with the Visual Studio 2010
>> C++
>> > Compiler and not really related to clang/llvm. The following snippet of
>> code
>> > does NOT compile in 2010..
>> >
>> > #include <vector>
>> > int main(int argc, char* argv[])
>> > {
>> >     std::pair<int, void*> mypair(0, NULL);
>> >     return 0;
>> > }
>> >
>>
>> That's perfectly fine -- it never #includes <utility>,
>> so there's no reason for std::pair to be in scope.
>>
>
> #include <vector>
> int main(int argc, char* argv[])
> {
>     std::pair<int, void*> mypair(0, (void*)NULL);
>
>     return 0;
> }
>
> compiles fine though...
> couple people have reported the same issue actually, and apparently this is
> by design due to C++0x:
>
>
> https://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair?wa=wsignin1.0#tabs
>
> Tom.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100501/cbc54f0e/attachment.html>


More information about the llvm-dev mailing list