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

Invalid conversion on static_cast from T1 to rvalue reference of T2

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Low
    • Resolution: Unresolved
    • Code Generation Tools
    • CODEGEN-3965
    • 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 results in a syntax error, while it is accepted by both gcc and clang.

      int main()
      {
          char c = 1;
          const int &&r = static_cast<const int&&>(c);
          return r;
      }

      As a workaround, 'c' may be cast to int. However, doing so will not bind reference r to the variable c.
      Show
      The following code results in a syntax error, while it is accepted by both gcc and clang. int main() {     char c = 1;     const int &&r = static_cast<const int&&>(c);     return r; } As a workaround, 'c' may be cast to int. However, doing so will not bind reference r to the variable c.

    Description

      Invalid conversion on static_cast from T1 to rvalue reference of T2

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: