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

            Bug ID: 94112
           Summary: Please add a warning for potentially throwing code in
                    noexcept function
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rafael at espindo dot la
  Target Milestone: ---

GCC produces a warning for

void foo() noexcept {
    throw 42;
}

But not for

static void bar() {
    throw 42;
}
void foo() noexcept {
    bar();
}

Such a warning would be quite handy for checking the usage of noexcept in a
codebase.

Reply via email to