Description of problem: There is an apparent bug in slice2cpp, in that it generates code like '0F' for float constants, which is not valid C++. Version-Release number of selected component (if applicable): 0:3.4.2-11.fc17 How reproducible: Always Steps to Reproduce: 1. Define an ICE class with a float member having a default value. 2. Attempt to compile the resulting code. Actual results: error: invalid suffix "F" on integer constant Expected results: Works. Additional info: This appears to be fixed upstream (see http://www.zeroc.com/forums/bug-reports/5431-default-vaules-slice.html), however that doesn't help that ICE in Fedora 17 is not usable. Please either update ICE to a later version or backport the fix for 3.4.2.
> Please either update ICE to a later version or backport the fix for 3.4.2. Ice 3.4.2 is the latest release available and there is no public source repository, so neither of these options is possible. Nonetheless I'll look forward patching slice2cpp.
Created attachment 577432 [details] patch to fix generation of bad float constants Thanks, and it is indeed unfortunate there is no public repository :-(. If it helps, the patch I ended up applying locally is attached. I'm not convinced it is optimal, but it seems to do the trick for my project.
ice-3.4.2-12.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ice-3.4.2-12.fc17
@Matthew: thanks for sharing your patch, i made a little change since value is already a std::string so no need to convert it.
Package ice-3.4.2-12.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ice-3.4.2-12.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-6076/ice-3.4.2-12.fc17 then log in and leave karma (feedback).
Is it possible to push this fix to F16 as well? And it might be worth posting the patch on http://www.zeroc.com/forums/patches/ to make sure that it gets into subsequent versions of Ice.
Oops, I see that the patch actually came from upstream :)
Looks like -12 is missing the line in the .spec to apply the patch?
There's a typo in the patch included in the current srpm -- there's an extra ")" at the end of one line. If you fix that, then it applies properly and fixes the issue.
ice-3.4.2-13.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ice-3.4.2-13.fc17
ice-3.4.2-14.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ice-3.4.2-14.fc17
ice-3.4.2-15.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ice-3.4.2-15.fc17
ice-3.4.2-15.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.