https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86207

            Bug ID: 86207
           Summary: A recurring bug?
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhonghao at pku dot org.cn
  Target Milestone: ---

The code is as follow:

constexpr int f(){
 if(true) return 0;
 throw 0;
}

int main(){
 constexpr auto i = f();
}

It comes from a previous report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371

Benjamin Buch said that the fixed code accepts the above code. I tried the
latest gcc, but it still produces error messages:

expression ‘<throw expression>’ is not a constant expression
      throw 0;

Is this a recurring bug?

Reply via email to