public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] gdb: don't use C++17 namespace declaration style
@ 2021-04-29 20:25 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2021-04-29 20:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

From: Simon Marchi <simon.marchi@efficios.com>

In a review, I suggested to use "namespace gdb::observers" instead of
two separate namespace declarations.  I didn't realize that this was a
C++17 feature, which breaks compilers that default to an earlier version
of the language, like g++ 4.8.  Change it back to two separate
declarations.

gdb/ChangeLog:

	* auto-load.h: Split namespace declaration.

Change-Id: I701537161967fbd9fcc298ff600bd072aab1251d
---
 gdb/ChangeLog   | 4 ++++
 gdb/auto-load.h | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ea65327e6e0c..8e77fa677e96 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-29  Simon Marchi  <simon.marchi@efficios.com>
+
+	* auto-load.h: Split namespace declaration.
+
 2021-04-29  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* infrun.c (save_waitstatus): Move variables to inner scope.
diff --git a/gdb/auto-load.h b/gdb/auto-load.h
index 4372ec4f4dd7..c10787f873bb 100644
--- a/gdb/auto-load.h
+++ b/gdb/auto-load.h
@@ -25,9 +25,11 @@ struct program_space;
 struct auto_load_pspace_info;
 struct extension_language_defn;
 
-namespace gdb::observers {
+namespace gdb {
+namespace observers {
 struct token;
-}
+} /* namespace observers */
+} /* namespace gdb */
 
 /* Value of the 'set debug auto-load' configuration variable.  */
 
-- 
2.30.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-29 20:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 20:25 [pushed] gdb: don't use C++17 namespace declaration style Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).