Multi-statement macro with statement before declaration does not compile

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-2259
    • ARM_17.6.0.STS
    • Hide
      I believe this is known issue CODEGEN-1979. If your source code has a statement (";") before a declaration ("int retVal = getVal();"), and the declaration does not have white space in front of it, the parser will emit an incorrect error ("error: expected a "}""). When you put code like that into the preprocessor, it strips all whitespace, so even though there actually is a space in the macro, there is no space when the parser gets to work. You'll need to rearrange your macro so that there are no statements before any of the declarations.
      Show
      I believe this is known issue CODEGEN-1979. If your source code has a statement (";") before a declaration ("int retVal = getVal();"), and the declaration does not have white space in front of it, the parser will emit an incorrect error ("error: expected a "}""). When you put code like that into the preprocessor, it strips all whitespace, so even though there actually is a space in the macro, there is no space when the parser gets to work. You'll need to rearrange your macro so that there are no statements before any of the declarations.
    • Duplicated CODEGEN-1979

      Multi-statement macro with statement before declaration does not compile

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-821 - Multi-statement macro with statemen...
                SYNCHRONIZED
                • Last Sync Date: