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

error C6003: switch condition has type bool [-Werror=switch-bool]

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Not specified
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0
    • Component/s: Code Generator
    • Labels:
      None

      Description

      When enabling c++11 support for the generated code, There is some ecl code as follows:

      myValue := (integer)(a != b);
      case(myValue, 0=>x, 1=>y, z);
      

      The c++ compiler complains about the generated code.

       

      Best solution would be to convert it to an IF in the constant folder.

       

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              ghalliday Gavin Halliday
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: