Re: gcc 4.5 doesn't like gdbm.h

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

 



Rex Dieter writes:

Sam Varshavchik wrote:

gcc 4.5 complains when compiling some C++ code that includes gdbm.h, with
a spurious warning:

#include <gdbm.h>

class xx {

 public:
    GDBM_FILE dbf;

};

[mrsam@octopus tmp]$ cat foo.c
#include "foo.h"
[mrsam@octopus tmp]$ g++ -c foo.c
In file included from foo.c:1:0:
foo.h:3:10: warning: âxxâ has a field âxx::dbfâ whose type uses the
anonymous namespace

The fix to gdbm.h, to get rid of this warning, is trivial, and has zero
impact.

I wrote to gdbm's listed maintainers two months ago, with no response.
Given that gdbm hasn't been updated in nearly a decade, I have to believe
that nobody really cares about this. Except developers who take a small
amount of pride that their code gets happily consumed by gcc, even with
-Werror. I see no way to work around this myself, it needs to be fixed in
gdbm.h.

If anyone here knows gdbm's maintainers, a minor release that tweaks the
header file, so that it can be pushed into Fedora, would be appreciated.

Please file a bug (and mention the # here), preferably with a patch, and I'm sure if the maintainers dont get to it, a provenpackager can and will (I offer to if it's not acted upon promptly).

Happy to do that, the patch is a no-brainer. Bug 668178.

My only concern is that something like this might lead to fragmentation. This may result in downstream packages, by default using -Werror if its configure detects gcc as the compiler. There's nothing wrong with configure setting gcc-specific flags, if the compiler is gcc, of course, but now you're going to have stuff that builds on Fedora with its default settings, but not on other distros.

But, I suppose, right now you might have stuff that builds by default on other distros, with older gcc, but for Fedora -Werror has to be dropped.

So, it's a wash, I suppose. This should really be fixed in gdbm itself.

Attachment: pgpukM8V7jiw6.pgp
Description: PGP signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux