This forum has been archived. Please start a new discussion on GitHub.

slice2py parsing errors

Hi Guys,

trying to compile some slice files using slice2py and am running into errors.
They all compile using slice2cpp without a hitch.
Current issue is with comments.

If I use the c++ style of // at the end of any code e.g

struct a // This is a struct
int a; // an int
float b; // an float
}; // end struct

The slice2py compiler will return an error for each case where a comment resides. Using slice2cpp works as expected. The workaround is to put the comment on its own line. Which is a HUGE pain when you have thousands of lines with comments !

Am I missing something or is this a BUG :)



  • benoit
    benoit Rennes, France

    It's a bug in the MCPP preprocessor that Ice is using to preprocess Slice files. Which Ice version and distribution do you use?

    The slice2py compiler from the Ice 3.4.0 binary distributions shouldn't have this problem as mcpp contains a patch for this issue.

    If you built mcpp and Ice from sources, you should make sure to apply the patch for mcpp 2.7.2 that is included with the 3rd party package (you can download this package from our download page here).

  • Thanks benoit

    FYI, I am using Ice 3.4.0 and mcpp 2.7.2 on Solaris 10 with gcc 4.3.4 compiler
    I applied the patch for mcpp 2.7.2 and slice2py is working happily :)