[Bug c++/46097] Switch to warn of global variables in a C++ shared object

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 22 20:37:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46097

--- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-22 20:36:45 UTC ---
(In reply to comment #28)
> > Are those libraries that crash designed to be used via dlopen, rather than
> > linking to them explicitly?
> Apparently they are (the authors would have marked the shared object with the 
> nodlopen option :/).

that would imply they RTFM ;)

I'm not sure I can contribute anything more useful to this PR. I think it would
be awesome the compiler or linker could diagnose ODR violations, but I have no
idea how to go about doing that.  Personally I don't think a warning about
using global variables is the right solution unless it can be tuned to only
warn about potentially dangerous cases.

I'm not going to close this PR as invalid though, if someone else can see how
to make a useful warning then I'd be all for it



More information about the Gcc-bugs mailing list