[llvm] r187310 - Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.

Aaron Ballman aaron at aaronballman.com
Sun Jul 28 11:05:20 PDT 2013


The MSVC 10 bot does seem to see the issue, but only in two places:

http://bb.pgr.jp/builders/cmake-clang-x64-msc16-R/builds/2075/steps/all_build_quick/logs/warnings%20%282%29

I'll add C4275 back to the list.  Thanks!

~Aaron

On Sun, Jul 28, 2013 at 10:16 AM, Kuperstein, Michael M
<michael.m.kuperstein at intel.com> wrote:
> I'm not passing any non-standard cmake options, using defaults.
>
> Happens in a lot of places. For example, this is what the beginning of the build log of LLVMSupport looks like:
>
> 2>------ Rebuild All started: Project: LLVMSupport, Configuration: Debug x64 ------
> 2>Build started 7/28/2013 5:15:00 PM.
> 2>_PrepareForClean:
> 2>  Deleting file "LLVMSupport.dir\Debug\LLVMSupport.lastbuildstate".
> 2>InitializeBuildStatus:
> 2>  Creating "LLVMSupport.dir\Debug\LLVMSupport.unsuccessfulbuild" because "AlwaysCreate" was specified.
> 2>CustomBuild:
> 2>  Building Custom Rule C:/work/LLVM/readwrite/lib/Support/CMakeLists.txt
> 2>  CMake does not need to re-run because C:\work\LLVM\readwrite\build\lib\Support\CMakeFiles\generate.stamp is up-to-date.
> 2>ClCompile:
> 2>  APFloat.cpp
> 2>  APInt.cpp
> 2>  APSInt.cpp
> 2>  Allocator.cpp
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>  BlockFrequency.cpp
> 2>  BranchProbability.cpp
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>  circular_raw_ostream.cpp
> 2>  CommandLine.cpp
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> 2>  Compression.cpp
> 2>  ConstantRange.cpp
> 2>  ConvertUTFWrapper.cpp
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
> 2>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(178): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_typeid'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
> 2>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(177) : see declaration of 'std::bad_typeid'
> ...
>
> -----Original Message-----
> From: aaron.ballman at gmail.com [mailto:aaron.ballman at gmail.com] On Behalf Of Aaron Ballman
> Sent: Sunday, July 28, 2013 17:14
> To: Kuperstein, Michael M
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm] r187310 - Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
>
> In which project are you getting this?  What do you pass in to cmake as options?
>
> Thanks!
>
> ~Aaron
>
> On Sun, Jul 28, 2013 at 3:35 AM, Kuperstein, Michael M <michael.m.kuperstein at intel.com> wrote:
>> My MSVC 2010 setup doesn't really like this.
>>
>> I get a whole lot of this:
>> 9>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(157): warning C4275: non dll-interface class 'stdext::exception' used as base for dll-interface class 'std::bad_cast'
>> 9>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(218) : see declaration of 'stdext::exception'
>> 9>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\typeinfo(156) : see declaration of 'std::bad_cast'
>>
>> Don't ask me why MSVC decides to issue a warning on its own headers, I agree that's broken, but...
>>
>> -----Original Message-----
>> From: llvm-commits-bounces at cs.uiuc.edu
>> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Aaron Ballman
>> Sent: Saturday, July 27, 2013 23:20
>> To: llvm-commits at cs.uiuc.edu
>> Subject: [llvm] r187310 - Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
>>
>> Author: aaronballman
>> Date: Sat Jul 27 15:20:28 2013
>> New Revision: 187310
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=187310&view=rev
>> Log:
>> Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
>>
>> Modified:
>>     llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
>>
>> Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLV
>> MOptions.cmake?rev=187310&r1=187309&r2=187310&view=diff
>> ======================================================================
>> ========
>> --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
>> +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Sat Jul 27
>> +++ 15:20:28 2013
>> @@ -168,10 +168,8 @@ if( MSVC )
>>      # Disabled warnings.
>>      -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
>>      -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
>> -    -wd4181 # Suppress 'qualifier applied to reference type; ignored'
>>      -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
>>      -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
>> -    -wd4275 # Suppress 'An exported class was derived from a class that was not exported.'
>>      -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'
>>      -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'
>>      -wd4355 # Suppress ''this' : used in base member initializer list'
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> ---------------------------------------------------------------------
>> Intel Israel (74) Limited
>>
>> This e-mail and any attachments may contain confidential material for
>> the sole use of the intended recipient(s). Any review or distribution
>> by others is strictly prohibited. If you are not the intended
>> recipient, please contact the sender and delete all copies.
>>
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.



More information about the llvm-commits mailing list