Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10674

Using a compound statement inside parenthesis in C++ causes the compiler to fail with INTERNAL ERROR: ac2000 experienced a segmentation fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Prioritized Not Prioritized

      The attached file.cpp has these lines ...

      #define functionmacro(datatype, value1)      \
      ({                                           \
         datatype return_value;                    \
                                                   \
         if (value1 == 1)                          \
         {                                         \
                   return_value = value1;          \
         }                                         \
         else if (value1 == 2)                     \
         {                                         \
             return_value = value1+2;              \
         }                                         \
         else                                      \
         {                                         \
           return_value = value1 - 2;              \
         }                                         \
         return_value;                             \
      })
      

      Build it ...

      % cl2000 file.cpp
      
      INTERNAL ERROR: ac2000 experienced a segmentation fault
                        while processing function fxn file file.cpp line 24
      
      This is caused by a defect in the TI C/C++ Parser.
      TI Customer Support may be able to suggest a workaround to avoid this.
      
      Upgrading to the newest version of the compiler may fix this problem.
      
      Contact TI in the E2E support forums at http://e2e.ti.com under
      "Development Tools", "TI C/C++ Compiler".  See the link titled
      "Submitting an issue".
      
      We need to see this ENTIRE error message and a complete, reproducible
      test case including ALL of the command-line options.
      Include the .pp file created by option --preproc_with_comment
      
      
      >> Compilation failure
      

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: