xiangaodielian / bullet

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

error: narrowing conversion in btSerializer.cpp (c++11, ARM) #617

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile for ARM targets using c++11.

What is the expected output? What do you see instead?

Fails to compile since chars are unsigned on the arm platform.

What version of the product are you using? On what operating system?

2.80 r2528

Please provide any additional information below.

Same as issue 604, but for ARM targets.
http://code.google.com/p/bullet/issues/detail?id=604&can=1&colspec=Modified%20ID
%20Type%20Stars%20Status%20Owner%20Summary

Attached patch does an explicit cast to (char) for all the negative values.

Original issue reported on code.google.com by cz82...@gmail.com on 2 Apr 2012 at 2:19

Attachments:

GoogleCodeExporter commented 9 years ago
It is an autogenerated file, so the casts are inconvenient.

Can you try making the array explicitly 'signed char'?

signed char sBulletDNAstr[]= {

Original comment by erwin.coumans on 2 Apr 2012 at 3:17

GoogleCodeExporter commented 9 years ago
By the way, what compiler version/platform/flags did you use to enable C++11?

Original comment by erwin.coumans on 2 Apr 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Is should be fixed in latest trunk, including the auto-generation code:
https://code.google.com/p/bullet/source/detail?r=2572

Can you try it?

Thanks for the report!

Original comment by erwin.coumans on 11 Sep 2012 at 4:02