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

noexcept(typeid(d)) runtime fail on polymorphic class type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • Code Generation Tools
    • CODEGEN-4259
    • Hide
      ARM_18.1.0.LTS
      MSP430_18.1.0.LTS
      C2000_22.6.0.LTS
      MSP430_20.2.0.LTS
      ARM_18.12.0.LTS
      MSP430_21.6.0.LTS
      C2000_21.6.0.LTS
      MSP430_18.12.0.LTS
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      Show
      ARM_18.1.0.LTS MSP430_18.1.0.LTS C2000_22.6.0.LTS MSP430_20.2.0.LTS ARM_18.12.0.LTS MSP430_21.6.0.LTS C2000_21.6.0.LTS MSP430_18.12.0.LTS ARM_20.2.0.LTS C2000_20.2.0.LTS

      Below runtime test fails armcl for first case:

      Cutdown test case:
      #include <typeinfo>
      struct B { virtual void mf(void) {} };
      struct D :B {} d, &r = d, *p = &d;
      int main(void) {
      if (noexcept(typeid(d)))

      { printf("fail d\n"); }

      <-- this line fails
      if (noexcept(typeid(*p)))

      { printf("fail *p\n"); }

      if (noexcept(typeid(r)))

      { printf("fail r\n"); }

      }

      Test is for noexcept operator 5.3.7;3a(7)
      noexcept is false if: a potentially-evaluated typeid expression applied to a glvalue expression
      whose type is a polymorphic class type.

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

              Created:
              Updated: