Since there is no means for the compiler to know that a function is an interrupt routine, and an interrupt vector can be assigned at runtime, I cannot see how this could work or would solve any issue. It could also be defeated by callbacks through pointers, and the issue is not specific to C++, it is as likely that some C function is inappropriate or ill-advised in an interrupt. On the subject of "opinion", it is certainly an opinion that this is a problem, and you are canvassing opinion on a solution. My opinion is that the solution lies in good design, design guidelines and code review. —
Clifford 28 secs ago