Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-21855

Incorrect string delimiter check inside MODULE, FORWARD

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2.0
    • Fix Version/s: 7.2.4
    • Component/s: eclcc
    • Labels:
      None
    • Environment:
      7.2.1 community_7.2.1-closedown0Debug[heads/upstream-candidate-7.2.x-0-g0d4524]

      Description

      Sample code:

      TestMod := MODULE, FORWARD
          EXPORT STRING TestFunction1(UNSIGNED1 n) := EMBED(C++)
              const char      hexchar[] = "0123456789ABCDEF";
      
              __lenResult = n;
              __result = static_cast<char*>(rtlMalloc(n));
              memcpy(__result, hexchar, n);
          ENDEMBED;
      END;
      
      OUTPUT(TestMod.TestFunction1(5));
      

      This code will fail syntax check:

      campda01@ubuntu:~/Desktop_OSX/ECL/LexisNexis: eclcc -syntax Testing/BWR_Test2.ecl
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(3,37): error C2196: " is not legal string delimiter; use ' instead
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(3,56): error C2194: BEGINC++ or EMBED is not terminated
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(3,56): error C3002: syntax error : expected BEGINC++
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(1,27): error C2100: Definition must contain EXPORT or SHARED value for TestFunction1
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(11,29): error C3002: syntax error near "(" : expected ')'
      /media/psf/Home/Desktop/ECL/LexisNexis/Testing/BWR_Test2.ecl(11,30): error C3001: Too many errors (max = 5); Aborting...
      

      Removing the FORWARD flag fixes this problem.

        Attachments

          Activity

            People

            • Assignee:
              richardkchapman Richard Chapman
              Reporter:
              dcamper Dan S. Camper
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: