Home Bug Reports

slice2html - forward declarations issue

kwaclawkwaclaw Oshawa, CanadaMember Karl WaclawekOrganization: Personal
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

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Thanks for the report.
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    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.
Sign In or Register to comment.