280: Mind explaining what changes are you making so we can understand and maybe cooperate?
Have you tested that GCC doesn't get broken?
Some of the changes are:
Strings:
Old: _T("text" "moretext")
New: _T("text") _T("moretext")
Multiple inheritance (one example)
ProjectManager must derive from wxEvtHandler, THEN from Mgr<ProjectManager>:
class WXDLLIMPEXP_CB ProjectManager : public wxEvtHandler, public Mgr<ProjectManager>
dllimport/dllexport... lots of changes to the way these were used and it works in GCC and MSVC now, and obviously won't change non-msw builds.
Fixed unchecked pointer errors, etc.
Fixed incorrectly declared and incorrectly used custom events
I prefer to just check them in if I could. That'd be much easier. :)
I just compiled Code::Blocks revision 1828 with the Linux version of icc 9.0 and it seems to work well. Just a few changes were necessary:
First one for AngelScript:
Index: src/sdk/as/source/as_scriptengine.cpp
===================================================================
--- src/sdk/as/source/as_scriptengine.cpp (revision 1828)
+++ src/sdk/as/source/as_scriptengine.cpp (working copy)
@@ -2236,7 +2236,7 @@
}
else if( i->callConv == ICC_STDCALL )
{
- void (STDCALL *f)(void *, void *) = (void (STDCALL *)(void *, void *))(i->func);
+ void (STDCALL *f)(void *, void *) = (void (/*STDCALL*/ *)(void *, void *))(i->func);
f(param1, param2);
}
else
I'm sure if this still works - but without this change icc produces weired error messages. Probably because it seems to behave as GCC and has __GNUC__ makros (or something similar) defined and STDCALL is therefore expandet to __attribute(stdcall) (or something similar) and icc doesn't undertand this.
The next patch is for keybinder:
Index: src/plugins/contrib/keybinder/keybinder.cpp
===================================================================
--- src/plugins/contrib/keybinder/keybinder.cpp (revision 1828)
+++ src/plugins/contrib/keybinder/keybinder.cpp (working copy)
@@ -1421,7 +1421,7 @@
// use a combobox + a listbox
m_pCommandsList = new wxListBox(this, wxKEYBINDER_COMMANDS_BOX_ID, wxDefaultPosition,
- wxDefaultSize, 0, NULL);
+ wxDefaultSize, 0, 0);
m_pCategories = new wxComboBox(this, wxKEYBINDER_CATEGORIES_ID,
wxEmptyString, wxDefaultPosition, wxDefaultSize,
0, NULL, wxCB_READONLY);
That's because in C++ 0 should be used instead of NULL for a zero-pointer. With NULL icc complains about two constructors that are matching to the current call.
And the last one is for the profiler-plugin:
Index: src/plugins/contrib/profiler/cbprofiler.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofiler.cpp (revision 1828)
+++ src/plugins/contrib/profiler/cbprofiler.cpp (working copy)
@@ -85,11 +85,12 @@
if (project->GetBuildTargetsCount() > 1)
{
// more than one executable target? ask...
- wxString choices[project->GetBuildTargetsCount()];
+ wxString* choices = new wxString[project->GetBuildTargetsCount()];
for (int i=0; i<project->GetBuildTargetsCount(); i++)
choices[i] = project->GetBuildTarget(i)->GetTitle();
wxSingleChoiceDialog dialog(Manager::Get()->GetAppWindow(),_("Select the target you want to profile"),
_("Select Target"),project->GetBuildTargetsCount(),choices);
+ delete[] choices;
dialog.SetSelection(0);
if (dialog.ShowModal() != wxID_OK)
return -1;
It seems as if there were arrays with a variable length used. But this is a feature of C99 and *not* C++98. New gcc versions seem to support this for C++, too, but it is not correct.
Another thing is: I used the linux build system. Switching to icc is quite easy, just add CXX=icc CC=icc when invoking the configure-script. But icc doens't understand the same commands for building precomipled headers as the gcc. This means that precomipled headers must be disabled or the flags must be changed to make word with icc, too (anyway, I wasn't able to do this). But adding --enable-pch=no to the configure-call doens't work - configure fails with an error message:
configure: Configuring Code::Blocks...
configure: error: conditional "PRECOMPILE_HEADERS" was never defined.
Usually this means the macro was only invoked conditionally.
Thus i had to remove the parts for precompiled headers manually from 'src/sdk/Makefile.am' and 'src/plugins/contrib/wxsmith/Makefile.am'.
But then it works, icc just shows a few warnings about parameters it doesn't understand, like '--fast-math'.