blueloveTH %!s(int64=2) %!d(string=hai) anos
pai
achega
42a7d02286

+ 1 - 1
3rd/cjson/src/cJSONw.cpp

@@ -49,7 +49,7 @@ static cJSON* convert_python_object_to_cjson(PyObject* obj, VM* vm){
         return cJSON_CreateNull();
     }
     vm->TypeError(fmt("unrecognized type ", obj_type_name(vm, obj_t).escape()));
-    PK_UNREACHABLE();
+    PK_UNREACHABLE()
 }
 
 

+ 2 - 2
examples/abort-the-vm/user_config.h

@@ -66,10 +66,10 @@
 
 #ifdef _MSC_VER
 #define PK_ENABLE_COMPUTED_GOTO		0
-#define PK_UNREACHABLE()				__assume(0)
+#define PK_UNREACHABLE()			__assume(0);
 #else
 #define PK_ENABLE_COMPUTED_GOTO		1
-#define PK_UNREACHABLE()				__builtin_unreachable()
+#define PK_UNREACHABLE()			__builtin_unreachable();
 #endif
 
 

+ 1 - 1
include/pocketpy/namedict.h

@@ -49,7 +49,7 @@ struct SmallNameDict{
                 return true;
             }
         )
-        PK_UNREACHABLE();
+        PK_UNREACHABLE()
     }
 
     V try_get(K key) const {

+ 1 - 1
src/ceval.cpp

@@ -854,7 +854,7 @@ __NEXT_STEP:;
 #undef DISPATCH_OP_CALL
 #undef CEVAL_STEP
 /**********************************************************************/
-            PK_UNREACHABLE();
+            PK_UNREACHABLE()
         }catch(HandledException){
             continue;
         }catch(UnhandledException){

+ 2 - 2
src/expr.cpp

@@ -111,7 +111,7 @@ namespace pkpy{
                 return index;
             }
         }
-        PK_UNREACHABLE();
+        PK_UNREACHABLE()
     }
 
     int CodeEmitContext::add_func_decl(FuncDecl_ decl){
@@ -626,7 +626,7 @@ namespace pkpy{
             case TK("!="):  ctx->emit_(OP_COMPARE_NE, BC_NOARG, line);  break;
             case TK(">"):   ctx->emit_(OP_COMPARE_GT, BC_NOARG, line);  break;
             case TK(">="):  ctx->emit_(OP_COMPARE_GE, BC_NOARG, line);  break;
-            default: PK_UNREACHABLE();
+            default: PK_UNREACHABLE()
         }
         // [b, RES]
         int index = ctx->emit_(OP_SHORTCUT_IF_FALSE_OR_POP, BC_NOARG, line);

+ 1 - 1
src/vm.cpp

@@ -466,7 +466,7 @@ i64 VM::py_hash(PyObject* obj){
     }
     if(has_custom_eq){
         TypeError(fmt("unhashable type: ", ti->name.escape()));
-        PK_UNREACHABLE();
+        PK_UNREACHABLE()
     }else{
         return PK_BITS(obj);
     }