[sr #110032] For C++98 stack_symbol_type defines only non-const operator=

anonymous <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/support/?110032>

                 Summary: For C++98 stack_symbol_type defines only non-const
operator=
                 Project: Bison
            Submitted by: None
            Submitted on: Wed 25 Sep 2019 04:38:56 PM UTC
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [email protected]
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

Setting the output language to C++ and compiling the output with a C++98
compiler, compilation fails on the IAR C++ compiler (version 6.70.2.6274).

The std::vector class of the IAR compiler relies on operator= in its push_back
implementation. Defining 'stack_symbol_type &operator=(stack_symbol_type &)'
stops the compiler implicitly generating operator= for other arguments.
Specifically 'const stack_symbol_type &operator=(const stack_symbol_type &) is
missing which is needed by std::vector::push_back.

The lalr1.cc skeleton needs to be changed to also define the const operator=
for stack_symbol_type (and also others like sematic_type when using variants)




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 25 Sep 2019 04:38:56 PM UTC  Name: PropertyNameParser.y  Size: 800B 
 By: None

<http://savannah.gnu.org/support/download.php?file_id=47570>
-------------------------------------------------------
Date: Wed 25 Sep 2019 04:38:56 PM UTC  Name: iar_error.txt  Size: 2KiB   By:
None

<http://savannah.gnu.org/support/download.php?file_id=47571>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110032>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.