Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to fix some compilation erros
authordegomme <augustin.degomme@unibas.ch>
Sat, 24 Oct 2015 21:52:26 +0000 (23:52 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Sat, 24 Oct 2015 21:52:26 +0000 (23:52 +0200)
src/mc/DwarfExpression.hpp
src/mc/mc_global.cpp
teshsuite/mc/dwarf_expression/dwarf_expression.cpp

index 7a64654..946f83c 100644 (file)
@@ -12,8 +12,8 @@ namespace dwarf {
 
 class evaluation_error : std::runtime_error {
 public:
-  evaluation_error(const char* what) : std::runtime_error(what) {}
-  ~evaluation_error();
+  evaluation_error(const char* what): std::runtime_error(what) {}
+  ~evaluation_error() noexcept(true);
 };
 
 struct ExpressionContext {
@@ -90,4 +90,4 @@ void execute(simgrid::dwarf::DwarfExpression const& expression,
 }
 }
 
-#endif
\ No newline at end of file
+#endif
index ccda078..7ead3c5 100644 (file)
@@ -508,8 +508,10 @@ void MC_print_statistics(mc_stats_t stats)
     if (_sg_mc_comms_determinism)
       XBT_INFO("Recv-deterministic : %s", !initial_global_state->recv_deterministic ? "No" : "Yes");
   }
-  if (getenv("SIMGRID_MC_SYSTEM_STATISTICS"))
-    system("free");
+  if (getenv("SIMGRID_MC_SYSTEM_STATISTICS")){
+    int ret=system("free");
+    if(ret!=0)XBT_WARN("system call did not return 0, but %d",ret);
+  }
 }
 
 void MC_automaton_load(const char *file)
index fa42b88..e9655c8 100644 (file)
@@ -39,7 +39,7 @@ uintptr_t eval_binary_operation(
     simgrid::dwarf::execute(ops, 3, state, stack);
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 
   assert(stack.size() == 1);
@@ -60,7 +60,7 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
   try {
     ops[0].atom = DW_OP_drop;
     simgrid::dwarf::execute(ops, 1, state, stack);
-    assert(("Exception expected", false));
+    fprintf(stderr,"Exception expected");
   }
   catch(simgrid::dwarf::evaluation_error& e) {}
 
@@ -122,7 +122,7 @@ void basic_test(simgrid::dwarf::ExpressionContext const& state) {
 
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 }
 
@@ -145,7 +145,7 @@ void test_deref(simgrid::dwarf::ExpressionContext const& state) {
 
   }
   catch(std::runtime_error& e) {
-    assert(("Expression evaluation error", false));
+    fprintf(stderr,"Expression evaluation error");
   }
 }