Skip to content

Failed to build with gcc9 #2

@mingodad

Description

@mingodad

When trying to build this project on Ubuntu-18.04 with gcc9 I was getting errors due to non matching parameter/return value, with the patch shown bellow I was able to build it:

diff --git a/TameParse/Lr/parser.h b/TameParse/Lr/parser.h
index 89b4151..1cf83f3 100644
--- a/TameParse/Lr/parser.h
+++ b/TameParse/Lr/parser.h
@@ -165,7 +165,7 @@ namespace lr {
             // (For hard-coded parsers, the tables often aren't, so there's no need to copy)
             if (copyFrom.m_OwnsTables) {
                 m_OwnsTables    = true;
-                m_ParserTables  = new parser_tables(copyFrom.m_ParserTables);
+                m_ParserTables  = new parser_tables(*copyFrom.m_ParserTables);
             } else {
                 m_OwnsTables    = false;
                 m_ParserTables  = copyFrom.m_ParserTables;
@@ -728,7 +728,7 @@ namespace lr {
         }
         
         /// \brief Retrieves the tables for this parser
-        inline const parser_tables& get_tables() const { return m_ParserTables; }
+        inline const parser_tables& get_tables() const { return *m_ParserTables; }
     };
     
     ///

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions