Spurious error on unevaluated use of undefined constexpr function

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • Code Generation Tools
    • CODEGEN-3947
    • 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

      The following code results in an error because the constexpr function a_ is not defined:

      constexpr int a_();
      char c_[ 2 + (0 && a_()) ];

      a_() is unevaluated, and a pedantic reading of the standard (5.19.2) allows the use of an undefined constexpr function when it is called in a constant expression and is unevaluated.

            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-1071 - Spurious error on unevaluated use o...
                SYNCHRONIZED
                • Last Sync Date: