Results 1 to 2 of 2

Thread: Many slice2* commands ignore lines with trailing "//" comments

  1. #1
    mefoster is offline Registered User
    Name: Mary Ellen Foster
    Organization: Heriot-Watt University, Edinburgh
    Project: ECHOES learning environment
    Join Date
    Jun 2006
    Posts
    121

    Many slice2* commands ignore lines with trailing "//" comments

    Consider the following Slice file:

    Code:
    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.

  2. #2
    mefoster is offline Registered User
    Name: Mary Ellen Foster
    Organization: Heriot-Watt University, Edinburgh
    Project: ECHOES learning environment
    Join Date
    Jun 2006
    Posts
    121
    Aha -- this seems to be an mcpp issue as described here:
    Mishap in slice compilers

    (Hee -- the initial post in that thread almost exactly duplicates mine here! Should have searched.)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 07:32 PM
  2. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  3. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  4. Replies: 4
    Last Post: 10-26-2006, 11:23 AM
  5. Replies: 1
    Last Post: 04-05-2004, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •