harrison-lucas / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

constant expression evaluates to -1 which cannot be narrowed to type 'unsigned char' on iOS on r2636 #702

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile r2636 in iOS project in XCode 4.6
2. Will see compile error stating 'constant expression evaluates to -1 which 
cannot be narrowed to type 'unsigned char'

What version of the product are you using? On what operating system?
r2636 compiling for iOS on XCode 4.6

Please provide any additional information below.
There is a -1 in the array initializer for an unsigned char, static casting the 
-1 to an unsigned char makes it compile but not sure about other side effects.

Original issue reported on code.google.com by marchin...@gmail.com on 12 Mar 2013 at 8:36

GoogleCodeExporter commented 9 years ago
yes, a static cast fixes the obnoxious compiler :-)

Fixed in latest trunk, thanks for the report:
https://code.google.com/p/bullet/source/detail?r=2694

Note that this only happens when the C++ Language Dialect is set to (GNU)++11

Original comment by erwin.coumans on 22 Oct 2013 at 7:21