[Scummvm-git-logs] scummvm master -> 502479d7be9d773247c3cdf9e520b7d8a1a0225c

bluegr noreply at scummvm.org
Tue Oct 11 06:08:42 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
502479d7be BASE: Add C++11 char array initialized by a string literal test


Commit: 502479d7be9d773247c3cdf9e520b7d8a1a0225c
    https://github.com/scummvm/scummvm/commit/502479d7be9d773247c3cdf9e520b7d8a1a0225c
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-10-11T09:08:37+03:00

Commit Message:
BASE: Add C++11 char array initialized by a string literal test

This was not properly implemented in GCC versions before 5.1, and
we still have some ports using older GCC versions.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43453#c7 and commit
6ac3994e3e582ec6a304c2a566bb1b0c69d507d2.

Changed paths:
    base/test_new_standards.cpp


diff --git a/base/test_new_standards.cpp b/base/test_new_standards.cpp
index f7cff651327..fd4610b9051 100644
--- a/base/test_new_standards.cpp
+++ b/base/test_new_standards.cpp
@@ -120,6 +120,16 @@ private:
 		// don't do anything with i
 	};
 
+#ifndef DONT_TEST_STRING_LITERAL_INIT
+	// ----------------------------------
+	// Char arrays initialized by a string literal
+	// * note - not properly implemented before GCC 5.1 (GCC Bug #43453)
+	// ----------------------------------
+	char _emptyMsg[1] = "";
+#else
+	char _emptyMsg[1] = { '\0' };
+#endif
+
 #ifndef DONT_TEST_FINAL_FUNCTION
 	// ----------------------------------
 	// Non-Overridable Member Functions (final)




More information about the Scummvm-git-logs mailing list