CTryCatch icon indicating copy to clipboard operation
CTryCatch copied to clipboard

try macro may have undefined behavior

Open brvtalcake opened this issue 2 years ago • 0 comments

In CTryCatch.h, the line in the try macro ...

if(!(CTRYCATCH_NAME(exception_type) = setjmp(CTRYCATCH_NAME(exception_env))))

... may cause undefined behavior, since setjmp's return value can not be used to initialize a variable (see cppreference for more details).

brvtalcake avatar May 08 '23 20:05 brvtalcake