Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
odd compiler behavior when compiling CB
jmccay:
I am using the June 25 (rev 2610 Unicode) build with mingw 3.4.5 compiler, and I am compiling using the latest Unicode cvs version (as of June 25) of wxWidgets. Using the default compiler options that came up when I loaded ( -Wall -g). I got 52 errors & over 2000 warnings. When I remove -Wall & -g and use -w, I get no errors & no warnings. I expected the no warnings, but I got no errors. I had originally copied the build log to a notepad, but I didn't save it. I did a search of the log and I couldn't find any real errors. A lot of warnings. This is just the messages copied:
--- Code: ---...
sdk\as\source\as_bytecode.cpp:1517: warning: unused parameter 'name'
sdk\as\source\as_bytecode.cpp:1517: warning: unused parameter 'module'
sdk\as\source\as_bytecode.cpp:1517: warning: unused parameter 'engine'
...
Compiling: sdk\wxscintilla\src\PlatWX.cpp
In file included from C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/memory.h:20,
from C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/object.h:25,
from C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/wx.h:16,
from sdk\wxscintilla\src\PlatWX.cpp:9:
C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/string.h:58: warning: type attributes are honored only at type definition
C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/string.h:249: warning: type attributes are honored only at type definition
C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/string.h:613: warning: type attributes are honored only at type definition
Compiling: sdk\wxscintilla\src\scintilla\src\Editor.cxx
sdk\wxscintilla\src\scintilla\src\Editor.cxx: In member function `virtual void Editor::NotifyStyleToNeeded(int)':
sdk\wxscintilla\src\scintilla\src\Editor.cxx:3537: warning: missing initializer for member `NotifyHeader::idFrom'
sdk\wxscintilla\src\scintilla\src\Editor.cxx:3537: warning: missing initializer for member `NotifyHeader::code'
sdk\wxscintilla\src\scintilla\src\Editor.cxx:3537: warning: missing initializer for member `SCNotification::position'
sdk\wxscintilla\src\scintilla\src\Editor.cxx:3537: warning: missing initializer for member `SCNotification::ch'
sdk\wxscintilla\src\scintilla\src\Editor.cxx:3537: warning: missing initializer for member `SCNotification::modifiers'
C:/development/libraries/wxwidgets/wxWidgets26u/wx/include/wx/gdicmn.h:41: warning: type attributes are honored only at type definition
In file included from sdk/sdk_common.h:136,
from sdk\sdk_precomp.h:8:
sdk/xtra_res.h:13: warning: type attributes are honored only at type definition
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:28: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksDockEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:100: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksLayoutEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:134: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
Compiling: sdk\as\bindings\const_bindings.cpp
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:28: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksDockEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:100: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksLayoutEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:134: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
Compiling: sdk\as\bindings\sc_io.cpp
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:28: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksDockEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:100: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksLayoutEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:134: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
Compiling: sdk\as\bindings\sc_wxarraystring.cpp
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:28: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
sdk/blockallocated.h: In instantiation of `static void* BlockAllocated<T, pool_size, debug>::operator new(size_t) [with T = CodeBlocksDockEvent, unsigned int pool_size = 75u, bool debug = false]':
sdk/sdk_events.h:100: instantiated from here
sdk/blockallocated.h:123: warning: unused parameter 'size'
...
Process terminated with status 0 (17 minutes, 28 seconds)
50 errors, 2579 warnings
--- End code ---
I edited a lot of the messages to get the message to post. Also, how can I generate pre-compiled headers for wxWidgets?
jmccay
tiwag:
well i'm not surprised about,
--- Quote from: the gcc docs --- -w Inhibit all warning messages.
--- End quote ---
with gcc 3.4.4 you don't get these annoying
--- Quote ---warning: type attributes are honored only at type definition
--- End quote ---
recent svn versions of CodeBlocks are building fine without warnings or errors using compiler options -Wall and -g
using wxWidgets263-unicode built with gcc 3.4.4
how the wxWidgets pch is generated you can see when you analyze a
project generated by the "wxWidgets application wizard",
when you get time to visit the "File"->"New projects ..." menu.
thomas:
I use MinGW 3.4.5 and see none of these (compiling Code::Blocks more than a dozen time per day).
You might want to switch to "full commandline" in compiler settings / compiler logging. This might not help solve the problem, but then it might too. In any case, "Compiling: sdk\wxscintilla\src\PlatWX.cpp" does not tell an awful lot.
If you were getting a dozen warnings, I would reply "hey, that's normal for every wxWidgets program" (for example wx/dnd.h is notorious about generating half a dozen warnings when you compile Code::Blocks).
However, since you actually see 52 errors, something must be wrong. Code::Blocks does not compile with errors (and not with 2500 warnings, either).
Also, some of the warnings refer to missing parameters in the instantiation of the blockallocated template from the cbEvent class, which is quite strange (since the template defines default values). As it happens, I know for sure that this piece of code works 100% reliably and compiles without any problems. :)
No idea what is causing this, a blind shot might be that you are using a wrong include path somewhere or you maybe used the wrong project file by accident (but even then this shouldn't happen...?).
With compiler logging set to "full commandline", chances are that we may be able to identify someting. Otherwise, I can only reply "this does not happen" (which really doesn't help) :)
tiwag:
--- Quote from: thomas on June 27, 2006, 12:05:27 pm ---I use MinGW 3.4.5 and see none of these (compiling Code::Blocks more than a dozen time per day).
--- End quote ---
it maybe depends how you've built your wxwidgets library,
i get thousands of
--- Quote ---warning: type attributes are honored only at type definition
--- End quote ---
when i use MinGW gcc 3.4.5,
but not with gcc 3.4.4
thomas:
Well, I get about one gigabyte worth of warning messages ("type attributes are honored...") while building the wxWidgets library -- but not while compiling Code::Blocks or anything else that uses the library.
I'd go crazy if that happened every time (and compiling Code::Blocks would probably take 30 minutes).
Navigation
[0] Message Index
[#] Next page
Go to full version