From ce4987199666fa0569aabf3eeb6e0c05e3e27ade Mon Sep 17 00:00:00 2001 From: Russell Standish Date: Tue, 28 Nov 2023 17:50:40 +1100 Subject: [PATCH] C++17 stuff. NB regression suite is not passing. --- classdesc | 2 +- graphcode | 2 +- include/TCL_obj_base.h | 11 +++++++++++ models/Stupid_Project/Makefile | 4 ++++ models/ecolab_model.h | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/classdesc b/classdesc index 27f42b7..6323085 160000 --- a/classdesc +++ b/classdesc @@ -1 +1 @@ -Subproject commit 27f42b74170ed113fd6fd8f59ac4f1cf8489ca5c +Subproject commit 632308554e668e7a93fca1279cd826c11ce06820 diff --git a/graphcode b/graphcode index f217533..bacc306 160000 --- a/graphcode +++ b/graphcode @@ -1 +1 @@ -Subproject commit f2175331408d2b7283970d3ac7ab9a64e4398c61 +Subproject commit bacc3069308e1dd8ed93768bb3734ebc76879c94 diff --git a/include/TCL_obj_base.h b/include/TCL_obj_base.h index f121846..d1aca33 100644 --- a/include/TCL_obj_base.h +++ b/include/TCL_obj_base.h @@ -92,6 +92,11 @@ namespace ecolab #pragma omit TCL_obj ecolab::TCL_args #endif +#if defined(__GNUC__) && !defined(__ICC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + /// RAII TCL_Obj ref class TCLObjRef { @@ -102,6 +107,7 @@ namespace ecolab ~TCLObjRef() {Tcl_DecrRefCount(ref);} TCLObjRef(const TCLObjRef& x): ref(x.ref) {Tcl_IncrRefCount(ref);} TCLObjRef& operator=(const TCLObjRef& x) { + Tcl_DecrRefCount(ref); ref=x.ref; Tcl_IncrRefCount(ref); return *this; @@ -109,6 +115,11 @@ namespace ecolab Tcl_Obj* get() const {return ref;} }; +#if defined(__GNUC__) && !defined(__ICC) +#pragma GCC diagnostic pop +#endif + + /// count class that exposes const public attribute class TCL_args_count { diff --git a/models/Stupid_Project/Makefile b/models/Stupid_Project/Makefile index d7cc740..6a606f7 100644 --- a/models/Stupid_Project/Makefile +++ b/models/Stupid_Project/Makefile @@ -13,6 +13,10 @@ include $(ECOLAB_HOME)/include/Makefile MODELS=stupid01 stupid02 stupid03 stupid04 stupid05 stupid06 stupid09 stupid10 stupid11 stupid12 stupid14 stupid15 stupid16 +# graphcode uses std::iterator, which is deprecated +# I don't know why the compiler is flagging Cell as uninitialised +CXXFLAGS+=-Wno-deprecated-declarations -Wno-maybe-uninitialized + ifdef TK MODELS+=stupid-field endif diff --git a/models/ecolab_model.h b/models/ecolab_model.h index 622ed26..3fd9d80 100644 --- a/models/ecolab_model.h +++ b/models/ecolab_model.h @@ -23,6 +23,7 @@ using classdesc::Object; class ecolab_point: public Object { protected: + using Object::pack; // override object::pack template A pack(const A& e, const M& mask, long ntrue=-1)