Make C++ compilers happy #2: const POD without initializer
Marcus Holland-Moritz [Fri, 24 Oct 2008 21:41:36 +0000 (21:41 +0000)]
is an error for g++, even when static.

p4raw-id: //depot/perl@34575

perl.c

diff --git a/perl.c b/perl.c
index ba5a208..c959815 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -662,7 +662,7 @@ perl_destruct(pTHXx)
            int f;
            const char *where;
            /* Our success message is an integer 0, and a char 0  */
-           static const char success[sizeof(int) + 1];
+           static const char success[sizeof(int) + 1] = {0};
 
            close(fd[0]);