mark tw_error as noreturn?
JohnPJenkins opened this issue · 2 comments
JohnPJenkins commented
__attribute__((noreturn))
in gcc/clang. I'm sure there's a similar if not the same syntax in xlc/pgi/icc, but I haven't checked yet. Could always wrap it in a macro that checks against GNUC or clang. Convenient for not having to use placeholder return
's in control flows that end in a tw_error, ie
int foo(int bar) { if (bar < 0) tw_error(TW_LOC, "oh noes!!!"); else return bar+1; }
laprej commented
JohnPJenkins commented
Hmm, so it is - I'll double check how I'm compiling...