Core 1601: Overload resolution for enum with fixed type

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-4000
    • Hide
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      MSP430_21.6.0.LTS
      MSP430_18.12.0.LTS
      ARM_20.2.0.LTS
      Show
      ARM_18.1.0.LTS MSP430_18.1.0.LTS MSP430_20.2.0.LTS ARM_18.12.0.LTS MSP430_21.6.0.LTS MSP430_18.12.0.LTS ARM_20.2.0.LTS
    • Hide
      Core issue 1601 states that the following code should call the overload of 'b' which takes a char argument, but the compiler chooses the int overload.

      enum A : char { a };
      int b(char) { return 1; }
      int b(int) { return 999; }

      int main()
      {
          printf("%d\n", b(a));
      }
      Show
      Core issue 1601 states that the following code should call the overload of 'b' which takes a char argument, but the compiler chooses the int overload. enum A : char { a }; int b(char) { return 1; } int b(int) { return 999; } int main() {     printf("%d\n", b(a)); }

      Core 1601: Overload resolution for enum with fixed type

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-1058 - Core 1601: Overload resolution for ...
                SYNCHRONIZED
                • Last Sync Date: