diff --git a/data/skeletons/glr2.cc b/data/skeletons/glr2.cc index 5f6a5c95..f15ab96d 100644 --- a/data/skeletons/glr2.cc +++ b/data/skeletons/glr2.cc @@ -1241,24 +1241,33 @@ public: getOption().~semantic_option(); } - glr_state& getState() { - YYDASSERT(is_state()); - return *reinterpret_cast(&raw_); + glr_state& getState () + { + YYDASSERT (is_state ()); + void *yyp = raw_; + return *static_cast (yyp); } - const glr_state& getState() const { - YYDASSERT(is_state()); - return *reinterpret_cast(&raw_); + const glr_state& getState () const + { + YYDASSERT (is_state()); + const void *yyp = raw_; + return *static_cast (yyp); } - semantic_option& getOption() { - YYDASSERT(!is_state()); - return *reinterpret_cast(&raw_); + semantic_option& getOption () + { + YYDASSERT (!is_state ()); + void *yyp = raw_; + return *static_cast (yyp); } - const semantic_option& getOption() const { - YYDASSERT(!is_state()); - return *reinterpret_cast(&raw_); + const semantic_option& getOption () const + { + YYDASSERT (!is_state ()); + const void *yyp = raw_; + return *static_cast (yyp); } - bool is_state() const { + bool is_state () const + { return is_state_; } private: