Bug #80024 Compilation failure in ConfigInfo.cpp using VS2105
Submitted: 18 Jan 2016 8:40 Modified: 20 Jan 2016 13:48
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.2. OS:Any
Assigned to: CPU Architecture:Any

[18 Jan 2016 8:40] Magnus Blåudd
Description:
Compilation failure occurs in ConfigInfo.cpp when compiling MySQL Cluster with VS2015. This is due du a "Breaking chnge" in VS2015 which interpret string literal concatenations without space in between as "user defined literals". 

This breaking change is describe in VS2015 manual in the "String literals followed by macros" section at https://msdn.microsoft.com/en-us/library/bb531344.aspx

How to repeat:
We need to add an additional space when concatenating string literals. Affected string literals are MGM_TOKEN_PRINT, API_TOKEN_PRINT, DB:_TOKEN_PRINT

#define MGM_TOKEN_PRINT "ndb_mgmd(MGM)"

const char* s = "Hello "MGM_TOKEN_PRINT" server";

Suggested fix:

Add spaces between the string literals being concatenated

const char* s = "Hello " MGM_TOKEN_PRINT " server";
                        ^               ^
[20 Jan 2016 13:48] Jon Stephens
Documented fix in the NDB 7.4.10 and 7.5.1 changelogs as follows:

    Compilation of MySQL with Visual Studio 2015 failed in
    ConfigInfo.cpp, due to a change in Visual Studio's handling
    of spaces and concatenation.

Closed.