Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compilation fails after 15.0 update

Dix_Lorenz
Beginner
2,580 Views

After I updated to 15.0 on a very old MFC codebase on Windows I get a couple of these errors:

 

error : extra text after expected end of number

They are all in Message Maps for ON_NOTIFY_REFLECT or ON_NOTIFY_REFLECT_EX.

 

	ON_NOTIFY_REFLECT_EX(NM_KILLFOCUS, OnKillfocus)
	ON_NOTIFY_REFLECT_EX(NM_SETFOCUS, OnSetfocus)
	ON_NOTIFY_REFLECT_EX(LVN_BEGINLABELEDIT, OnBeginlabeledit)
	ON_NOTIFY_REFLECT_EX(LVN_ENDLABELEDIT, OnEndlabeledit)
or 
BEGIN_MESSAGE_MAP(CmM4_Footnotes_ExpandedTree, CmM4_TreeCtrl)
	//{{AFX_MSG_MAP(CmM4_Footnotes_ExpandedTree)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
	ON_NOTIFY_REFLECT_EX(LVN_INSERTITEM,OnUpdateTreeContents)
	ON_NOTIFY_REFLECT_EX(LVN_DELETEITEM,OnUpdateTreeContents)
	ON_NOTIFY_REFLECT_EX(LVN_DELETEALLITEMS,OnUpdateTreeContents)
END_MESSAGE_MAP()

All that is code that has been unchanged for ages, I have to assume there is some compiler bug at work; anybody can confirm that or maybe have a suggestion for a workaround?

 

0 Kudos
1 Solution
Judith_W_Intel
Employee
2,605 Views

 

Are you using the /Qstd=c++11 option?

I only see the problem when user defined literals are enabled (which only happens by default in MSVC++ 2015 compatibility mode).

If so you can disable them with the /Qoption,cpp,--no_user_defined_literals option.

!% icl -c /Qoption,cpp,--user_defined_literals t.cpp
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Ve
rsion 15.0 Beta Build x
Built Jan 19 2015 12:59:50 by jward4 on JWARD4-DESK1 in D:/workspaces/15_0cfe/de
v
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

t.cpp
t.cpp(2): error: extra text after expected end of number
  int i = 0x004E+0xBC00;
                ^

compilation aborted for t.cpp (code 2)
!% icl -c /Qoption,cpp,--no_user_defined_literals t.cpp
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Ve
rsion 15.0 Beta Build x
Built Jan 19 2015 12:59:50 by jward4 on JWARD4-DESK1 in D:/workspaces/15_0cfe/de
v
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

t.cpp
!% icl -c t.cpp
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Ve
rsion 15.0 Beta Build x
Built Jan 19 2015 12:59:50 by jward4 on JWARD4-DESK1 in D:/workspaces/15_0cfe/de
v
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

t.cpp
!%

Judy

View solution in original post

0 Kudos
21 Replies
Dix_Lorenz
Beginner
287 Views

/Qoption,cpp,--no_user_defined_literals does work for me as a work-around, that's good to know.

Thanks,

Dix

 

0 Kudos
Reply