[Bug c++/93222] __attribute__((always_inline)) changes program behaviour unexpectedly
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 10 11:13:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93222
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Your grabListTail function fails to check if this->empty() which means that
this cast might be undefined:
Node* localTail = static_cast<Node*>(_xHead.pPrev);
When this->empty() is true _xHead.pPrev == _xHead which is of type DListNode,
not Node, so the cast is invalid.
More information about the Gcc-bugs
mailing list