[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 14/35] Default to non-verbose mode in Ltest-cxx
From: |
Tommi Rantala |
Subject: |
[Libunwind-devel] [PATCH 14/35] Default to non-verbose mode in Ltest-cxx-exceptions |
Date: |
Tue, 18 Sep 2012 16:31:23 +0300 |
---
tests/Ltest-cxx-exceptions.cxx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/Ltest-cxx-exceptions.cxx b/tests/Ltest-cxx-exceptions.cxx
index 827ba98..99aca7b 100644
--- a/tests/Ltest-cxx-exceptions.cxx
+++ b/tests/Ltest-cxx-exceptions.cxx
@@ -21,10 +21,6 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -33,6 +29,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#define panic(args...) \
{ fprintf (stderr, args); exit (-1); }
+static int verbose;
+
struct Test
{
public: // --- ctor/dtor ---
@@ -55,13 +53,16 @@ extern "C" void bar()
throw 5;
} catch (...) {
Test t;
- printf("Throwing an int\n");
+ if (verbose)
+ printf("Throwing an int\n");
throw 6;
}
}
-int main()
+int main(int argc, char **argv __attribute__((unused)))
{
+ if (argc > 1)
+ verbose = 1;
try {
Test t;
bar();
--
1.7.9.5
- [Libunwind-devel] [PATCH 11/35] PPC: remove unused `PAGE_START' macro from Ginit.c, (continued)
- [Libunwind-devel] [PATCH 11/35] PPC: remove unused `PAGE_START' macro from Ginit.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 05/35] Simplify `sos_alloc()' implementation, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 09/35] IA64: avoid -Wunused-but-set-variable in src/ia64/init.h, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 10/35] Remove unused src/x86_64/Lis_signal_frame.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 15/35] Clear out `ip' to avoid -Wuninitialized warning in tests/test-coredump-unwind.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 07/35] Use __sync builtin atomics on all architectures if available, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 13/35] HPPA: kludge out unused variable in unw_get_save_loc() stub, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 08/35] Apply UNW_ALIGN more in src/mi/mempool.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 12/35] HPPA: properly check dwarf_get() return value in unw_step(), Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 17/35] Workaround volatileness warning in tests/ia64-test-setjmp.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 14/35] Default to non-verbose mode in Ltest-cxx-exceptions,
Tommi Rantala <=
- [Libunwind-devel] [PATCH 16/35] Avoid -Wunused-value warning in tests/Gia64-test-stack.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 20/35] Annotate potentially unused variable in tests/test-coredump-unwind.c, Tommi Rantala, 2012/09/18
- [Libunwind-devel] [PATCH 21/35] Drop `optimize' attribute in tests/test-varargs.c, Tommi Rantala, 2012/09/18