aboutsummaryrefslogtreecommitdiff
path: root/libitm/ChangeLog
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-12 10:54:53 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-12 10:54:53 -0700
commitf0de5d83eecd4902e4a0447bfa4863014b6b2eaf (patch)
tree944f7e1b231934e27192db86841d55d6d8429f16 /libitm/ChangeLog
parentd17cdc17c90ce77cb90c569322c1f241d3530cec (diff)
downloadgcc-f0de5d83eecd4902e4a0447bfa4863014b6b2eaf.zip
gcc-f0de5d83eecd4902e4a0447bfa4863014b6b2eaf.tar.gz
gcc-f0de5d83eecd4902e4a0447bfa4863014b6b2eaf.tar.bz2
Fix throw specifiers on interface.
I discovered that libitm: (a) declares __cxa_allocate_exception and friends directly, (b) doesn't mark them as 'throw()' (c) doesn't mark the replacment fns _ITM_$foo as nothrow either We happen to get away with it because of code in the compiler that, although it checks the parameter types, doesn't check the exception specification. (One reason being they used to not be part of the language's type system, but now they are.) I suspect this can lead us to generate pessimal code later, if we've seen one of these decls earlier. Anyway, with modules it becomes trickier[*], so I'm trying to clean it up and not be a problem. I see Jakub fixed part of the problem (https://gcc.gnu.org/pipermail/gcc-patches/2018-December/513302.html) AFAICT, he did fix libitm's decls, but left the lax parm-type checking in the compiler. libitm.h is not very informative about specification: in version 1 of http://www.intel.com/some/path/here.pdf. */ Anyway, it was too fiddly to have libitm pick up the declarations from libsupc++. Besides it makes them weak declarations, and then provides definitions for non-elf systems. So this patch adds the expected 'throw()' * libitm/libitm.h (_ITM_NOTHROW): Define. (_ITM_cxa_allocate_exception, _ITM_cxa_free_exception) (_ITM_cxa_begin_catch): Use it. * eh_cpp.cc: Add throw() to __cxa_allocate_exception, __cxa_free_exception, __cxa_begin_catch, __cxa_tm_cleanup, __cxa_get_globals. (_ITM_cxa_allocate_exception, _ITM_cxa_free_exception) (_ITM_cxa_begin_catch): Likewise.
Diffstat (limited to 'libitm/ChangeLog')
-rw-r--r--libitm/ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index 37a1b44..295fb94 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,15 @@
+2020-05-12 Nathan Sidwell <nathan@acm.org>
+
+ Fix throw specifiers on interface.
+ * libitm/libitm.h (_ITM_NOTHROW): Define.
+ (_ITM_cxa_allocate_exception, _ITM_cxa_free_exception)
+ (_ITM_cxa_begin_catch): Use it.
+ * eh_cpp.cc: Add throw() to __cxa_allocate_exception,
+ __cxa_free_exception, __cxa_begin_catch, __cxa_tm_cleanup,
+ __cxa_get_globals.
+ (_ITM_cxa_allocate_exception, _ITM_cxa_free_exception)
+ (_ITM_cxa_begin_catch): Likewise.
+
2020-05-05 Nathan Sidwell <nathan@acm.org>
* testsuite/lib/libitm.exp (libitm_init): Add