Never issue a warning if the exception is unused
This commit is contained in:
parent
f2b431f80a
commit
9eedf4ce0d
2 changed files with 3 additions and 5 deletions
|
@ -37,7 +37,6 @@ main()
|
||||||
try {
|
try {
|
||||||
puts("try2");
|
puts("try2");
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
(void)ex;
|
|
||||||
puts("this should not be called");
|
puts("this should not be called");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +49,6 @@ main()
|
||||||
throw(1);
|
throw(1);
|
||||||
return 1;
|
return 1;
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
(void)ex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
if (trycatch_ex == 0)
|
if (trycatch_ex == 0)
|
||||||
#define catch(ex) \
|
#define catch(ex) \
|
||||||
trycatch_frame_pop(); \
|
trycatch_frame_pop(); \
|
||||||
for (int ex = trycatch_ex; trycatch_ex != 0; trycatch_ex = 0)
|
for (int ex = trycatch_ex; trycatch_ex != 0; trycatch_ex = 0, (void)ex)
|
||||||
#define throw(ex) trycatch_throw(ex)
|
#define throw(ex) trycatch_throw(ex)
|
||||||
#define rethrow trycatch_throw(trycatch_ex)
|
#define rethrow trycatch_throw(trycatch_ex)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue