Open llvmbot opened 8 years ago
Fix has been sent for review (http://reviews.llvm.org/D16770).
Denis Zobnin
Software Engineer Intel Compiler Team Intel
I will handle this.
Denis Zobnin
Software Engineer Intel Compiler Team Intel
A-ha, this is a C vs C++ issue.
MSVC accepts this in C mode.
Hrm, VS2013 fails for me:
D:\>type t.cpp
#include <windows.h>
typedef size_t SIZE_T;
D:\>cl -c t.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
t.cpp
t.cpp(2) : error C2371: 'SIZE_T' : redefinition; different basic types
C:\Program Files (x86)\Windows Kits\8.1\include\shared\basetsd.h(415) : see declaration of 'SIZE_T'
MSVC 2015 Compiler version: 19.00.23720.0(x86) reports the following for me: error C2371: 'SIZE_T': redefinition; different basic types c:\tools_root\cl\inc\shared\basetsd.h(415): note: see declaration of 'SIZE_T'
Seems like our behavior is the same as MSVC's.
Yep, seems that I was using VS2013:
$ cl -c test.c
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.c
test.c(2) : warning C4142: benign redefinition of type
I will try it with VS2015 as sonn as possible, but anyway, do we need to change Clang's behavior to be able to compile spec2000 with it?
MSVC 2015 Compiler version: 19.00.23720.0(x86) reports the following for me:
error C2371: 'SIZE_T': redefinition; different basic types
c:\tools_root\cl\inc\shared\basetsd.h(415): note: see declaration of 'SIZE_T'
Seems like our behavior is the same as MSVC's.
Extended Description
==========Environment============ OS: Windows Visual Studio: VS2015 Clang: trunk
=========How to reproduce========
=========Error===================
================== Intel Compiler Engineer Kuleshov Andrey