mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 11:20:40 +00:00
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
6ac3994e3e
.
This commit is contained in:
parent
19514bc2ad
commit
502479d7be
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user