[PATCH] D23960: Avoid narrowing warnings in __bitset constructor

Dimitry Andric via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 2 14:10:34 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280543: Avoid narrowing warnings in __bitset constructor (authored by dim).

Changed prior to commit:
  https://reviews.llvm.org/D23960?vs=69489&id=70231#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23960

Files:
  libcxx/trunk/include/bitset

Index: libcxx/trunk/include/bitset
===================================================================
--- libcxx/trunk/include/bitset
+++ libcxx/trunk/include/bitset
@@ -259,7 +259,7 @@
 #if __SIZEOF_SIZE_T__ == 8
     : __first_{__v}
 #elif __SIZEOF_SIZE_T__ == 4
-    : __first_{__v, __v >> __bits_per_word}
+    : __first_{static_cast<__storage_type>(__v), static_cast<__storage_type>(__v >> __bits_per_word)}
 #else
 #error This constructor has not been ported to this platform
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23960.70231.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160902/0b58f7e8/attachment.bin>


More information about the cfe-commits mailing list