diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-11-10 16:57:15 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-11-16 07:55:55 +0100 |
commit | 29dd634a4c0b9c3579cf9d318ed64d748d848b1d (patch) | |
tree | 83968b769967aba2ca8236c9b2434f00b34674c6 /configure.cmake | |
parent | 8f60656fd58610a7ed0b65321d229b44ab618f9a (diff) | |
download | mariadb-git-29dd634a4c0b9c3579cf9d318ed64d748d848b1d.tar.gz |
dbug: correct trace for DBUG_RETURN(func()); -- gcc only
when func1 calls func2 from DBUG_RETURN, dbug shows the trace as
| > func1
| < func1
| > func2
| < func2
because DBUG_LEAVE happens before func2(). Change that to invoke
DBUG_LEAVE when the local variable goes out of scope. This uses
gcc specific __attribute__((cleanup)).
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 1dade02aa32..e8d29c5bf5f 100644 --- a/configure.cmake +++ b/configure.cmake @@ -910,6 +910,14 @@ CHECK_C_SOURCE_COMPILES(" HAVE_WEAK_SYMBOL ) +CHECK_C_SOURCE_COMPILES(" + void foo(int *x) { } + int main() { + int a __attribute__((cleanup(foo))); + return 0; + }" + HAVE_ATTRIBUTE_CLEANUP +) CHECK_CXX_SOURCE_COMPILES(" #include <new> |