Archived

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

slice2html - forward declarations issue

kwaclaw
kwaclaw Oshawa, Canada
It seems slice2html cannot handle forward declarations. The following slice compiles fine for C#, Java or C++, but slice2html returns "test.ice:7: `two' is not defined".
module test {

interface two;  //forward

interface one {
  void do();
  two* getTwo();
};

interface two {
  void do();
};

};

Karl

Comments

  • matthew
    matthew NL, Canada
    Thanks for the report.
  • kwaclaw wrote: »
    It seems slice2html cannot handle forward declarations. The following slice compiles fine for C#, Java or C++, but slice2html returns "test.ice:7: `two' is not defined".
    interface two;  //forward
    

    This is caused by a bug in mcpp. It produces
    //forward interface two;
    

    as the preprocessed output.

    As a work-around, you can move the comment onto a separate line, or you can rewrite this as
    interface two; /* forward */
    

    With a C-style comment, mcpp gets it right.

    Cheers,

    Michi.