IDL 4.1 RTF Avatar
  1. OMG Issue

IDL41 — Declarator specification in structures overly strict

  • Key: IDL41-1
  • Status: closed   Implementation work Blocked
  • Source: Vanderbilt University ( William Otte)
  • Summary:

    Consider the following from the standard, which defines a struct:

    ```
    (45) <struct_dcl> ::= <struct_def> | <struct_forward_dcl>
    (46) <struct_def> ::= "struct" <identifier> "

    {" <member>+ "}

    "
    (47) <member> ::= <type_spec> <declarators> ";"
    (67) <declarators> ::= <declarator>

    { "," <declarator> }
    (68) <declarator> ::= <simple_declarator>
    ```

    Note rule 67. As stated, the following is valid:

    ```
    struct Foo { int bar, baz; }
    ```

    But neither of the following:

    ```
    struct Foo { int bar; }

    struct Foo { int bar, bad, qux; }
    ```

    If rule 67 is amended thusly:
    ```
    (67) <declarators> ::= <declarator> { "," <declarator> }

    *
    ```

    then all thee above are valid. Is this intended?

    Also, rules 65 and 124 appear to suffer the same deficiency:

    ```
    (65) <any_declarators> ::= <any_declarator>

    { "," <any_declarator> }

    (124) <context_expr> ::= "context" "(" <string_literal>

    { "," <string_literal> }

    ")"
    ```

  • Reported: IDL 4.0 — Tue, 31 May 2016 13:15 GMT
  • Disposition: Resolved — IDL 4.1
  • Disposition Summary:

    Add the missing '' in the rules 65,67 and 124*

    This is just typos resulting from an unfortunate cut and paste.

    Rules 65, 67 and 124 should be:
    (65) <any_declarators> ::= <any_declarator>

    { "," <any_declarator> }

    *
    (67) <declarators> ::= <declarator>

    { "," <declarator> }

    *
    (124) ‎<context_expr>‎ ‎::=‎ ‎"context" "(" <string_literal>

    { "," <string_literal> }

    * ")"‎

    Nothing else has to be changed in the specification.

  • Updated: Thu, 6 Apr 2017 13:50 GMT