]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
restore bootstrap with --enable-checking=release [PR121260]
authorMikael Pettersson <mikpelinux@gmail.com>
Mon, 28 Jul 2025 11:44:46 +0000 (13:44 +0200)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 28 Jul 2025 14:55:31 +0000 (10:55 -0400)
Current trunk doesn't bootstrap with --enable-checking=release
due to improper nesting of namespaces and #if CHECKING_P blocks.
This corrects that.

gcc/
PR other/121260
* diagnostics/changes.cc: Correct nesting of namespaces
and #if CHECKING_P blocks.
* diagnostics/context.cc: Likewise.
* diagnostics/html-sink.cc: Likewise.
* diagnostics/output-spec.cc: Likewise.
* diagnostics/sarif-sink.cc: Likewise.

Signed-off-by: Mikael Pettersson <mikpelinux@gmail.com>
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/diagnostics/changes.cc
gcc/diagnostics/context.cc
gcc/diagnostics/html-sink.cc
gcc/diagnostics/output-spec.cc
gcc/diagnostics/sarif-sink.cc

index 290d6022b5ae97345a303cfa1bdb8b990d400924..e1caab0e59fc15f96e9bd9e17540df5a15a9958b 100644 (file)
@@ -1850,8 +1850,13 @@ run_all_tests ()
 }
 
 } // namespace diagnostics::changes::selftest
+
+#endif /* CHECKING_P */
+
 } // namespace diagnostics::changes
 
+#if CHECKING_P
+
 namespace selftest { // diagnostics::selftest
 
 /* Run all of the selftests within this file.  */
@@ -1863,6 +1868,7 @@ changes_cc_tests ()
 }
 
 } // namespace selftest
-} // namespace diagnostics
 
 #endif /* CHECKING_P */
+
+} // namespace diagnostics
index 0dbc14810395fd3112abc81711d5467a41af1542..85f7d2a357ac607348fc198d2ea961d6c8ee4b99 100644 (file)
@@ -2130,10 +2130,11 @@ context_cc_tests ()
 }
 
 } // namespace diagnostics::selftest
-} // namespace diagnostics
 
 #endif /* #if CHECKING_P */
 
+} // namespace diagnostics
+
 #if __GNUC__ >= 10
 #  pragma GCC diagnostic pop
 #endif
index 07e71871d181945cb1f8a173bced674df3d4dd25..13d6309b7a45a15598e200c4774cc02a50d620d8 100644 (file)
@@ -1702,6 +1702,7 @@ html_sink_cc_tests ()
 }
 
 } // namespace selftest
-} // namespace diagnostics
 
 #endif /* CHECKING_P */
+
+} // namespace diagnostics
index 08128a92add1d3f9fe40a0f1fb92a382c5d660ac..83f128cc536b7b6ad282b162523b376e21133547 100644 (file)
@@ -846,6 +846,7 @@ output_spec_cc_tests ()
 }
 
 } // namespace diagnostics::selftest
-} // namespace diagnostics
 
 #endif /* #if CHECKING_P */
+
+} // namespace diagnostics
index 05c0a8eb3a9282c49406b3b862150d7961b2965f..4738ae9c3007d0289087e1f9151bda63493768c0 100644 (file)
@@ -5072,6 +5072,7 @@ sarif_sink_cc_tests ()
 }
 
 } // namespace diagnostics::selftest
-} // namespace diagnostics
 
 #endif /* CHECKING_P */
+
+} // namespace diagnostics