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

--- Comment #5 from Juraj Oršulić <juraj.orsulic at fer dot hr> ---
Thanks on the explanation, Jonathan - you are completely right. I have renamed
the bug title accordingly. Also, here's a further reduction of the working
example - there's no need for a switch and the conditional invocation of
LogMessageFatal.

struct S {
  ~S() { }
};

int flush_result();

class LogMessageFatal {
 public:
  ~LogMessageFatal() __attribute__ ((noreturn));
};


int Flush() {

  S lol;

  if(flush_result()) {
      return 1;
  }

  LogMessageFatal();
}

Reply via email to