File tree Expand file tree Collapse file tree
executable/bytecode/instructions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ include(CheckCXXSourceCompiles)
55
66project (python++)
77
8- set (CMAKE_CXX_STANDARD 23 )
8+ set (CMAKE_CXX_STANDARD 26 )
99
1010include (cmake/CPM.cmake )
1111
Original file line number Diff line number Diff line change 7979
8080using namespace py ;
8181
82+ // GCC 16 inlines the std::variant copy-assignment behind py::Value and then
83+ // attributes the std::vector destructor's operator delete to the stack slot
84+ // holding the variant. Nothing is freed here; the diagnostic is a false positive.
85+ #if defined(__GNUC__) && !defined(__clang__)
86+ #pragma GCC diagnostic push
87+ #pragma GCC diagnostic ignored "-Wfree-nonheap-object"
88+ #endif
8289Instruction::RAIIStoreNonCallInstructionData::RAIIStoreNonCallInstructionData ()
8390{
8491 reg0 = VirtualMachine::the ().reg (0 );
8592}
93+ #if defined(__GNUC__) && !defined(__clang__)
94+ #pragma GCC diagnostic pop
95+ #endif
8696
8797Instruction::RAIIStoreNonCallInstructionData::~RAIIStoreNonCallInstructionData ()
8898{
Original file line number Diff line number Diff line change @@ -80,7 +80,17 @@ bool PyCell::empty() const
8080
8181PyResult<PyObject *> PyCell::__repr__ () const { return PyString::create (to_string ()); }
8282
83+ // GCC 16 inlines the std::variant copy-assignment behind py::Value and then
84+ // attributes the std::vector destructor's operator delete to the stack slot
85+ // holding the variant. Nothing is freed here; the diagnostic is a false positive.
86+ #if defined(__GNUC__) && !defined(__clang__)
87+ #pragma GCC diagnostic push
88+ #pragma GCC diagnostic ignored "-Wfree-nonheap-object"
89+ #endif
8390void PyCell::set_cell (const Value &new_value) { m_content = new_value; }
91+ #if defined(__GNUC__) && !defined(__clang__)
92+ #pragma GCC diagnostic pop
93+ #endif
8494
8595namespace {
8696 std::once_flag cell_flag;
Original file line number Diff line number Diff line change 1717#include < string_view>
1818
1919#include < sys/stat.h>
20+ #include < unistd.h>
2021
2122namespace fs = std::filesystem;
2223
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ PyResult<PyList *> create_sys_paths(Interpreter &interpreter)
4040 const auto &entry_script = interpreter.entry_script ();
4141 auto entry_parent = PyString::create (std::filesystem::path (entry_script).parent_path ());
4242 if (entry_parent.is_err ()) return Err (entry_parent.unwrap_err ());
43- auto path_list = PyList::create ({
43+ auto path_list = PyList::create (std::vector<Value> {
4444 entry_parent.unwrap (),
4545 PyString::create (kPythonLibPath .data ()).unwrap (),
4646 });
You can’t perform that action at this time.
0 commit comments