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

Core 1601: Overload resolution for enum with fixed type

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Medium
    • Resolution: Unresolved
    • 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)); }

    Description

      Core 1601: Overload resolution for enum with fixed type

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: