mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +00:00
c++: add copy ctors for compatibility with the IAR compiler
Reported by Andreas Damm. https://savannah.gnu.org/support/?110032 * data/skeletons/lalr1.cc (stack_symbol_type::operator=): New overload, const, to please the IAR C++ compiler (version ca 2013).
This commit is contained in:
1
THANKS
1
THANKS
@@ -10,6 +10,7 @@ Albert Chin-A-Young china@thewrittenword.com
|
|||||||
Alexander Belopolsky alexb@rentec.com
|
Alexander Belopolsky alexb@rentec.com
|
||||||
Alexandre Duret-Lutz adl@lrde.epita.fr
|
Alexandre Duret-Lutz adl@lrde.epita.fr
|
||||||
Andre da Costa Barros andre.cbarros@yahoo.com
|
Andre da Costa Barros andre.cbarros@yahoo.com
|
||||||
|
Andreas Damm adamm@onica.com
|
||||||
Andreas Schwab schwab@suse.de
|
Andreas Schwab schwab@suse.de
|
||||||
Andrew Suffield asuffield@users.sourceforge.net
|
Andrew Suffield asuffield@users.sourceforge.net
|
||||||
Angelo Borsotti angelo.borsotti@gmail.com
|
Angelo Borsotti angelo.borsotti@gmail.com
|
||||||
|
|||||||
@@ -335,6 +335,10 @@ m4_define([b4_shared_declarations],
|
|||||||
/// Assignment, needed by push_back by some old implementations.
|
/// Assignment, needed by push_back by some old implementations.
|
||||||
/// Moves the contents of that.
|
/// Moves the contents of that.
|
||||||
stack_symbol_type& operator= (stack_symbol_type& that);
|
stack_symbol_type& operator= (stack_symbol_type& that);
|
||||||
|
|
||||||
|
/// Assignment, needed by push_back by other implementations.
|
||||||
|
/// Needed by some other old implementations.
|
||||||
|
stack_symbol_type& operator= (const stack_symbol_type& that);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -627,6 +631,17 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if YY_CPLUSPLUS < 201103L
|
#if YY_CPLUSPLUS < 201103L
|
||||||
|
]b4_parser_class[::stack_symbol_type&
|
||||||
|
]b4_parser_class[::stack_symbol_type::operator= (const stack_symbol_type& that)
|
||||||
|
{
|
||||||
|
state = that.state;
|
||||||
|
]b4_variant_if([b4_symbol_variant([that.type_get ()],
|
||||||
|
[value], [copy], [that.value])],
|
||||||
|
[[value = that.value;]])[]b4_locations_if([
|
||||||
|
location = that.location;])[
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
]b4_parser_class[::stack_symbol_type&
|
]b4_parser_class[::stack_symbol_type&
|
||||||
]b4_parser_class[::stack_symbol_type::operator= (stack_symbol_type& that)
|
]b4_parser_class[::stack_symbol_type::operator= (stack_symbol_type& that)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user