You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on Xcode 7 or clang-3.6, ns-3 bindings generated by pybindgen raise many warnings such as below for potentially evaluated expression in the argument:
src/topology-read/bindings/ns3module.cc:1482:16: error: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Werror,-Wpotentially-evaluated-expression]
if (typeid((*const_cast<ns3::Node *> (ns3::PeekPointer (retval)))).name() == typeid(PyNs3Node__PythonHelper).name())
To reproduce, check out ns-3.24 release (not ns-3.24.1) and compile with python bindings enabled on either clang-3.6 or Xcode 7.0 machine (may have to disable Werror).
We are suppressing this for now in the wscript, but I wonder if an upstream fix is possible to move the possibly side-effect-inducing expression out of the argument.
The text was updated successfully, but these errors were encountered:
Hm, I wonder which "side effects" the compiler means. I am not aware of any side effects here... AFAIK, (*const_cast (ns3::PeekPointer (retval))) has no side effects, but I'd have to check more closely...
I can't figure this one out. Tried adding __attribute__ ((pure, const)) to the PeekPointer definition, clang still complains. I am writing this off as a clang bug. Not fixing pybindgen.
on Xcode 7 or clang-3.6, ns-3 bindings generated by pybindgen raise many warnings such as below for potentially evaluated expression in the argument:
src/topology-read/bindings/ns3module.cc:1482:16: error: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Werror,-Wpotentially-evaluated-expression]
if (typeid((*const_cast<ns3::Node *> (ns3::PeekPointer (retval)))).name() == typeid(PyNs3Node__PythonHelper).name())
To reproduce, check out ns-3.24 release (not ns-3.24.1) and compile with python bindings enabled on either clang-3.6 or Xcode 7.0 machine (may have to disable Werror).
We are suppressing this for now in the wscript, but I wonder if an upstream fix is possible to move the possibly side-effect-inducing expression out of the argument.
The text was updated successfully, but these errors were encountered: