[QGIS-trac] Re: [Quantum GIS] #1239: Compilation strict mode and warnings cleanup for GCC 4.1

Quantum GIS qgis at qgis.org
Sat Aug 23 10:44:20 EDT 2008


#1239: Compilation strict mode and warnings cleanup for GCC 4.1
----------------------------------------------------+-----------------------
        Reporter:  mloskot                          |         Owner:  nobody                          
            Type:  patch                            |        Status:  closed                          
        Priority:  minor: annoyance or enhancement  |     Milestone:                                  
       Component:  Build/Install                    |       Version:  HEAD                            
      Resolution:  fixed                            |      Keywords:  gcc  warnings strictness cleanup
Platform_version:  10.5                             |      Platform:  OS X                            
        Must_fix:  No                               |   Status_info:  0                               
----------------------------------------------------+-----------------------
Comment (by mloskot):

 Jef,

 Thanks for applying it. A few additional comments.

  * You may also add [http://msdn.microsoft.com/en-
 us/library/aa699247(VS.60).aspx /Gz] and [http://msdn.microsoft.com/en-
 us/library/aa278577(VS.60).aspx /Za] for Visual C++ compiler.

  * cast_to_fptr does not make much sense. It cleans warning but it doesn't
 solve the problem and dlsym/QLibrary::resolve
 [http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.8
 still seriously breaks C++ rules]: ''It's illegal, period.''. Unless,
 functions being loaded are exported as C functions using ''extern "C"''.

  I would suggest to enable this warning back, so it's not forgotten. C++
 standarization committee has noticed this problem and [http://www.open-
 std.org/jtc1/sc22/wg21/docs/cwg_active.html#195 is working to find a
 solution]. POSIX gurus have noticed that problem too and probably new
 version of dlsym will be released in future (see
 [http://www.opengroup.org/onlinepubs/009695399/functions/dlsym.html
 Rationale])

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1239#comment:2>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list