mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
lalr1.cc: fix compiler warnings
Reported by Rob Conde. http://lists.gnu.org/archive/html/bug-bison/2013-03/msg00003.html * data/stack.hh (operator=, stack(const stack&)): Make this class uncopyable, i.e., "undefine" these operators: make them private and don't implement them. (clear): New. * data/lalr1.cc: Use it instead of an assignment. (parser): Make this class uncopyable.
This commit is contained in:
@@ -77,6 +77,12 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
||||
seq_.pop_front ();
|
||||
}
|
||||
|
||||
void
|
||||
clear ()
|
||||
{
|
||||
seq_.clear ();
|
||||
}
|
||||
|
||||
inline
|
||||
unsigned int
|
||||
height () const
|
||||
@@ -88,6 +94,8 @@ b4_copyright([Stack handling for Bison parsers in C++],
|
||||
inline const_iterator end () const { return seq_.rend (); }
|
||||
|
||||
private:
|
||||
stack (const stack&);
|
||||
stack& operator= (const stack&);
|
||||
S seq_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user