[gcc r15-4980] libstdc++: Move include guards to start of headers
Jonathan Wakely
redi@gcc.gnu.org
Wed Nov 6 12:49:28 GMT 2024
https://gcc.gnu.org/g:6a050a3e650c7718c0a8cc948cd57706795f9805
commit r15-4980-g6a050a3e650c7718c0a8cc948cd57706795f9805
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Nov 5 12:54:32 2024 +0000
libstdc++: Move include guards to start of headers
libstdc++-v3/ChangeLog:
* include/c_compatibility/complex.h (_GLIBCXX_COMPLEX_H): Move
include guard to start of the header.
* include/c_global/ctgmath (_GLIBCXX_CTGMATH): Likewise.
Diff:
---
libstdc++-v3/include/c_compatibility/complex.h | 6 +++---
libstdc++-v3/include/c_global/ctgmath | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libstdc++-v3/include/c_compatibility/complex.h b/libstdc++-v3/include/c_compatibility/complex.h
index 605d1f30e06e..a3102d9fce30 100644
--- a/libstdc++-v3/include/c_compatibility/complex.h
+++ b/libstdc++-v3/include/c_compatibility/complex.h
@@ -26,6 +26,9 @@
* This is a Standard C++ Library header.
*/
+#ifndef _GLIBCXX_COMPLEX_H
+#define _GLIBCXX_COMPLEX_H 1
+
#include <bits/c++config.h>
#if __cplusplus >= 201103L
@@ -42,7 +45,4 @@
# endif
#endif
-#ifndef _GLIBCXX_COMPLEX_H
-#define _GLIBCXX_COMPLEX_H 1
-
#endif
diff --git a/libstdc++-v3/include/c_global/ctgmath b/libstdc++-v3/include/c_global/ctgmath
index 79c1a029f41d..39c17668f16a 100644
--- a/libstdc++-v3/include/c_global/ctgmath
+++ b/libstdc++-v3/include/c_global/ctgmath
@@ -26,13 +26,13 @@
* This is a Standard C++ Library header.
*/
+#ifndef _GLIBCXX_CTGMATH
+#define _GLIBCXX_CTGMATH 1
+
#ifdef _GLIBCXX_SYSHDR
#pragma GCC system_header
#endif
-#ifndef _GLIBCXX_CTGMATH
-#define _GLIBCXX_CTGMATH 1
-
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
More information about the Libstdc++-cvs
mailing list