lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] MinGW gcc-4.3, and .tar.lzma


From: Vadim Zeitlin
Subject: Re[2]: [lmi] MinGW gcc-4.3, and .tar.lzma
Date: Mon, 1 Sep 2008 20:17:43 +0200

On Sat, 30 Aug 2008 01:31:15 +0000 Greg Chicares <address@hidden> wrote:

GC> Here's the relevant part of an unapplied local patch; I don't recall
GC> the reason for inhibiting each of these warnings, but IIRC the reasons
GC> will become obvious if you don't inhibit them.
GC> 
GC> +ifeq (4.3.0,$(gcc_version))
GC> +  # Suppress spurious gcc-4.3.0 warnings:
GC> +  gcc_version_specific_warnings := \
GC> +    -Wno-array-bounds \
GC> +    -Wno-attributes \
GC> +    -Wno-conversion \
GC> +    -Wno-parentheses \
GC> +    -Wno-uninitialized \
GC> +    -Wno-unused \
GC> +endif

 I didn't find any need for any of them except -Wno-conversion (or, rather,
simply removing -Wconversion as this one is not even enabled by -Wall) and
-Wno-parentheses. The latter could be enabled, it happens a number of times
but is trivial to fix and in most cases adding the extra parentheses would
help making the code more clear. The former unfortunately results in a huge
number of warnings and it doesn't seem doable to fix all of them. It's a
pity as I did see plenty of bugs which could be uncovered by this warning
(or its MSVC equivalent which I also had to disable in my MSVC compilation
patch) but you have to start your project with this warning enabled, fixing
all occurrences of it retroactively is almost hopeless. Please let me know
what do you think about -Wno-parentheses.

 Except for the warnings problems I also had

main_wx.cpp:196: error: 'int wxEntry(HINSTANCE__*, HINSTANCE__*, CHAR*,
int)' redeclared without dllimport attribute: previous dllimport ignored

which I fixed by just removing the block starting with "// WX !! Oddly
enough, wx seems to require this declaration" comment as I really don't see
what is it for. Can you still reproduce the problem which required adding
it? If not, could you please apply the trivial patch at the end of the
message?

 And I had a few more warnings like this:

        ld.exe: warning: auto-importing has been activated without
        --enable-auto-import specified on the command line. This should
        work unless it involves constant data structures referencing
        symbols from auto-imported DLLs.

for some boost::filesystem symbols (this is using Boost 1.36.0 BTW) and a
few LMI ones (datum_{base,string} and ce_product_name). But as the linker
said that it should work fine I decided to just trust it and didn't look
further into this.

 To summarize, LMI seems to work just fine with mingw32 4.3.1 but I didn't
have the time to run the unit tests yet and will do it next.

 Regards,
VZ


--- main_wx.cpp 2008-08-04 14:47:22 +0000
+++ main_wx.cpp 2008-09-01 17:29:32 +0000
@@ -183,19 +183,6 @@
 */
 END_EVENT_TABLE()

-#ifdef LMI_MSW
-// WX !! Oddly enough, wx seems to require this declaration, even
-// though <wx/app.h> has been included and that header in turn
-// includes <wx/msw/app.h>. Apparently the prototype in the latter
-// header differs in the types of the first two arguments.
-extern int wxEntry
-    (HINSTANCE hInstance
-    ,HINSTANCE hPrevInstance
-    ,LPSTR     pCmdLine
-    ,int       nCmdShow
-    );
-#endif // LMI_MSW defined.
-
 #ifndef LMI_MSW
 int main(int argc, char* argv[])
 #else // LMI_MSW defined.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]