Fri, 04/11/2008 - 03:12
I'm using OCC 6.2 installed on KUbuntu 7.10. When compiling some of my programs with gcc (4.1.3) I always get plenty of annoying compilation warnings of the form "warning: deprecated conversion from string constant to ‘char*’".
In header gp_Dir.lxx there are at least a tenth of those warnings, the first one is at line 18 :
It seems that all those warnings are caused by the way the exception mechanism is implemented. When defining the macro "No_Exception" then most of those warnings are hidden but some reside and persist ! Particularly a deprecation warning in TCollection_AsciiString.lxx at lign 112.
I tried to quickly tweak the source code but with no success. How could those warnings be removed ?
Fri, 04/11/2008 - 10:29
If you only want to get rid of the warnings, why not just disable the warnings, then you don't have to mess with the source code.
Fri, 04/11/2008 - 10:50
How to disable the warnings .. is there any flag ?
Fri, 04/11/2008 - 12:11
In general I don't like to disable warnings, however I would do so in this case. But I can't find how to disable a specific warning with g++ (4.1.3). I'll try something like -Wno-deprecated but all deprecation warnings will be mute.
Wed, 08/27/2008 - 13:30
Using gcc 4.2.3 I still have the same problem : bunch of the deprecation warnings in OpenCascade headers. I tried -Wno-deprecated but with no effect.
Do guys working with gcc and OpenCascade have the problem ?
How to disable this deprecation warning with gcc ? Can't find how to do so.