public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix several preprocessor directives
@ 2023-07-30 13:55 François Dumont
  2023-08-07 10:46 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: François Dumont @ 2023-07-30 13:55 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Committed as obvious.

     libstdc++: Fix several preprocessor directives

     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.

François

[-- Attachment #2: preprocessor.patch --]
[-- Type: text/x-patch, Size: 1738 bytes --]

diff --git a/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h b/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
index 70c9342d88a..faf8221b273 100644
--- a/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
+++ b/libstdc++-v3/src/c++11/compatibility-ldbl-facets-aliases.h
@@ -23,11 +23,11 @@
 // <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
diff --git a/libstdc++-v3/src/c++11/locale-inst-monetary.h b/libstdc++-v3/src/c++11/locale-inst-monetary.h
index d8fecf26596..954de1f52cf 100644
--- a/libstdc++-v3/src/c++11/locale-inst-monetary.h
+++ b/libstdc++-v3/src/c++11/locale-inst-monetary.h
@@ -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"
diff --git a/libstdc++-v3/src/c++11/locale-inst-numeric.h b/libstdc++-v3/src/c++11/locale-inst-numeric.h
index c77ee9e8d38..b917fe5802e 100644
--- a/libstdc++-v3/src/c++11/locale-inst-numeric.h
+++ b/libstdc++-v3/src/c++11/locale-inst-numeric.h
@@ -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"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed] Fix several preprocessor directives
  2023-07-30 13:55 [committed] Fix several preprocessor directives François Dumont
@ 2023-08-07 10:46 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2023-08-07 10:46 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

On Sun, 30 Jul 2023 at 14:55, François Dumont via Libstdc++ <
libstdc++@gcc.gnu.org> wrote:

> Committed as obvious.
>
>      libstdc++: Fix several preprocessor directives
>
>      A wrong usage of #define in place of a #error seems to have been
> replicated
>      at different places in source files.
>

Oops, thanks!


>
>      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.
>
> François
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-07 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-30 13:55 [committed] Fix several preprocessor directives François Dumont
2023-08-07 10:46 ` Jonathan Wakely

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).