]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix several preprocessor directives
authorFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 28 Jul 2023 17:17:03 +0000 (19:17 +0200)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 30 Jul 2023 13:52:00 +0000 (15:52 +0200)
A wrong usage of #define in place of a #error seems to have been replicated
at different places in source files.

libstdc++-v3/ChangeLog:

* src/c++11/compatibility-ldbl-facets-aliases.h: Replace #define with
proper #error.
* src/c++11/locale-inst-monetary.h: Likewise.
* src/c++11/locale-inst-numeric.h: Likewise.

libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
libstdc++-v3/src/c++11/locale-inst-monetary.h
libstdc++-v3/src/c++11/locale-inst-numeric.h

index 70c9342d88a3f2307ad65440719c49912a5cc1bc..faf8221b273500196c03f5a8f946d12c8b29d259 100644 (file)
 // <http://www.gnu.org/licenses/>.
 
 #ifndef C
-#define "This file should not be compiled directly, only included"
+# error "This file should not be compiled directly, only included"
 #endif
 
 #ifndef _GLIBCXX_LONG_DOUBLE_COMPAT
-#define "This file should only be used for _GLIBCXX_LONG_DOUBLE_COMPAT builds"
+# error "This file should only be used for _GLIBCXX_LONG_DOUBLE_COMPAT builds"
 #endif
 
 // XXX GLIBCXX_ABI Deprecated
index d8fecf2659633a5354fd4884e01204cf3d5ca1da..954de1f52cf7e1c6f9e55e1ba4d41dcf5f55e091 100644 (file)
@@ -23,7 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #ifndef C
-#define "This file should not be compiled directly, only included"
+# error "This file should not be compiled directly, only included"
 #endif
 
 #include "facet_inst_macros.h"
index c77ee9e8d38472cb3c791b0548fad7ba5fb277ff..b917fe5802e000071fb584d450cd21c7533fbf59 100644 (file)
@@ -23,7 +23,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #ifndef C
-#define "This file should not be compiled directly, only included"
+# error "This file should not be compiled directly, only included"
 #endif
 
 #include "facet_inst_macros.h"