Statements before declarations with no white space (aggravated by macros) may cause incorrect parser error

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-1979
    • Hide
      C6000_8.2.0
       ARM_15.12.0.LTS
       ARP32_1.0.0B1
      Show
      C6000_8.2.0  ARM_15.12.0.LTS  ARP32_1.0.0B1
    • Hide
      ARP32_1.0.9
       ARM_18.1.0.LTS
       C2000_18.1.0.LTS
      Show
      ARP32_1.0.9  ARM_18.1.0.LTS  C2000_18.1.0.LTS
    • Hide
      Do not start any statement in the left-most column
      Rearrange your code so that there are no statements before declarations.
      Show
      Do not start any statement in the left-most column Rearrange your code so that there are no statements before declarations.
    • Hide
      C99 and C++ allow statements before declarations in functions. This is not allowed by the C89 language, but as an extension, the TI compiler allows such statements in relaxed mode. However, in certain circumstances, the compiler may emit the 'error: expected "}"' for otherwise legal code which has statements before declarations.

      This problem can only occur in relaxed C89 mode (which is the default mode), and 1) you have a function with statements that start in the left-most column, or 2) you use macros where the macro body contains C code with statements before declarations.
      Show
      C99 and C++ allow statements before declarations in functions. This is not allowed by the C89 language, but as an extension, the TI compiler allows such statements in relaxed mode. However, in certain circumstances, the compiler may emit the 'error: expected "}"' for otherwise legal code which has statements before declarations. This problem can only occur in relaxed C89 mode (which is the default mode), and 1) you have a function with statements that start in the left-most column, or 2) you use macros where the macro body contains C code with statements before declarations.

      Statements before declarations with no white space (aggravated by macros) may cause incorrect parser error

            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-856 - Statements before declarations with...
                SYNCHRONIZED
                • Last Sync Date: