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

Unimplemented core issue 1374: Conversion sequence ranks qualification before reference binding

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Low
    • Resolution: Unresolved
    • Code Generation Tools
    • CODEGEN-3999
    • 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
      The following code will print B, when both gcc and clang print A. This is due to a resolution to core issue 1374, which reorders the rankings of conversion sequences such that qualification difference are accounted for after reference binding differences, rather than before.

      #include <stdio.h>
      typedef int * T1;
      typedef int *const T2;
      void foo(T1 &) { printf("A\n"); } // (1)
      void foo(T2 &&) { printf("B\n"); } // (2)
      int main() {
        foo((int *)0); // Normally prefers (2), but now prefers
        return 0; // (1) in GNU and Clang modes.
      }
      Show
      The following code will print B, when both gcc and clang print A. This is due to a resolution to core issue 1374, which reorders the rankings of conversion sequences such that qualification difference are accounted for after reference binding differences, rather than before. #include <stdio.h> typedef int * T1; typedef int *const T2; void foo(T1 &) { printf("A\n"); } // (1) void foo(T2 &&) { printf("B\n"); } // (2) int main() {   foo((int *)0); // Normally prefers (2), but now prefers   return 0; // (1) in GNU and Clang modes. }

    Description

      Unimplemented core issue 1374: Conversion sequence ranks qualification before reference binding

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: