Archived
This forum has been archived. Please start a new discussion on GitHub.
Many slice2* commands ignore lines with trailing "//" comments
Consider the following Slice file:
This works as expected if I run slice2cpp, slice2php, or slice2rb.
However, if I run slice2cs, slice2html, slice2java, or slice2py on it, I get the following warning:
If I move the comment to above "int value" line instead of inline as in the file, then all slice2* generators process it fine.
The same failure seems to also occur in classes, although it's more dangerous: there's no warning, but slice2* will just silently generate a class without the "value" member.
This doesn't happen with "/*" comments as far as I can tell.
This is with Ice 3.4.2 on Fedora 16.
module test { struct TestStruct { int value; // the value }; };
This works as expected if I run slice2cpp, slice2php, or slice2rb.
However, if I run slice2cs, slice2html, slice2java, or slice2py on it, I get the following warning:
/home/mef3/tmp/Test.ice:4: struct `TestStruct' must have at least one member
If I move the comment to above "int value" line instead of inline as in the file, then all slice2* generators process it fine.
The same failure seems to also occur in classes, although it's more dangerous: there's no warning, but slice2* will just silently generate a class without the "value" member.

This doesn't happen with "/*" comments as far as I can tell.
This is with Ice 3.4.2 on Fedora 16.
0
Comments
-
Aha -- this seems to be an mcpp issue as described here:
http://www.zeroc.com/forums/bug-reports/5309-mishap-slice-compilers.html
(Hee -- the initial post in that thread almost exactly duplicates mine here! Should have searched.)0