Re: GDB13 fails to build on MacOS using supplied GNU Bison 2.3

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Torbjorn> Not sure what you mean by "appended" here... I see no attachment and
Torbjorn> my mail clarily stated that I could not generate the configure script
Torbjorn> using the autotools.

Sorry, forgot to append it.

Tom

diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index d6531260c86..58ea541a5c9 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -267,7 +267,7 @@ cooked_index_shard::handle_gnat_encoded_entry (cooked_index_entry *entry,
   if (canonical.empty ())
     return {};
   std::vector<gdb::string_view> names = split_name (canonical.c_str (),
-						    split_style::DOT);
+						    split_style::DOT_STYLE);
   gdb::string_view tail = names.back ();
   names.pop_back ();
 
diff --git a/gdb/split-name.h b/gdb/split-name.h
index 47896cc4406..e385ed7dba5 100644
--- a/gdb/split-name.h
+++ b/gdb/split-name.h
@@ -30,8 +30,9 @@ enum class split_style
   NONE,
   /* C++ style, with "::" and template parameter intelligence.  */
   CXX,
-  /* Split at ".".  Used by Ada, Go, D.  */
-  DOT,
+  /* Split at ".".  Used by Ada, Go, D.  This has a name to work
+     around a bug in Bison 2.3, which is used on macOS.  */
+  DOT_STYLE,
   /* Split at "__".  Used by Ada encoded names.  */
   UNDERSCORE,
 };
diff --git a/gdb/symtab.h b/gdb/symtab.h
index ee4729b14cd..ae9816dfc7d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -305,7 +305,7 @@ class lookup_name_info final
 	break;
       case language_d:
       case language_go:
-	style = split_style::DOT;
+	style = split_style::DOT_STYLE;
 	break;
       }
     return ::split_name (language_lookup_name (lang), style);
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.