#15 Eliminate warnings and errors with gcc-4.3-20071109

open
nobody
None
5
2007-11-18
2007-11-18
Tom Browder
No

I just got gcc-4.3-20071109 snapshot built and started to use it and soon discovered that it finds more problems than 4.2.1, including errors with loki-lib. I copied my loki-lib directory (which is synched with sourceforge) to loki-lib_gcc4.3 where I tried to eliminate all the errors and warnings (some warnings I ignored per Andrei's embedded instructions and for others I had to turn off
certain warning flags). I have attached a patch from running:

diff -Naur -x.svn loki-lib loki-lib_gcc4.3

-Tom

Tom Browder
Niceville, FLorida
USA

Discussion

  • Zak Kipling
    Zak Kipling
    2008-04-22

    Logged In: YES
    user_id=764271
    Originator: NO

    Several of these patches add

    #include <string.h>

    in order to get global-namespace declarations of strlen, strcmp and friends.

    Isn't this deprecated in Annex D of the standard, in favour of

    #include <cstring>

    with the names qualified as std::strlen etc?

     
  • Tom Browder
    Tom Browder
    2008-04-23

    Logged In: YES
    user_id=861162
    Originator: YES

    I believe you're correct. I'll go back, make those changes, make sure the changes compile, and attach the corrected patch.

     
  • Tom Browder
    Tom Browder
    2008-04-23

    Logged In: YES
    user_id=861162
    Originator: YES

    Hm, after updating my loki with svn, and making the changes from <string.h> to <cstring>, I can build static and shared, but I'm now having a problem compiling test/CachedFactoryTest.

    I'll report back after I figure that one out.

     
  • Zak Kipling
    Zak Kipling
    2008-04-23

    Logged In: YES
    user_id=764271
    Originator: NO

    I get errors there too -- I think it needs Loki:: qualifications on the nested Factory and Key typedefs in CachedFactory.h (lines 665 and 692) in order to be valid according to the stricter scoping rules in 4.3.

     
  • Tom Browder
    Tom Browder
    2008-04-24

    Logged In: YES
    user_id=861162
    Originator: YES

    OK, the changes suggested by zak-k worked. Attached is a corrected patch from running svn diff in my updated working directory.

    File Added: Loki-lib.patch.gcc4.3.corrected

     
  • Tom Browder
    Tom Browder
    2008-04-24

    Logged In: YES
    user_id=861162
    Originator: YES

    I've deleted the original, incorrect patch.

     
  • Tom Browder
    Tom Browder
    2008-08-08

    Logged In: YES
    user_id=861162
    Originator: YES

    Is there still an issue with this patch? I believe it should be added to the trunk in time for the next release unless there is something wrong.

    Should I file a bug report? I see a previous report and fix for a pre-release version of g++ 4.3. G++ 4.3.1 is now the latest official release and the errors and warnings still exist.

    Thanks.