The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15203 
====================================================================== 
Reported By:                Lekensteyn
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15203
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-10-10 17:46 EDT
Last Modified:              2014-10-10 17:46 EDT
====================================================================== 
Summary:                    CheckStructHasMember breaks on -Wunused-value
Description: 
When CMAKE_C_FLAGS containg -Wall -Werror, CheckStructHasMember will always fail
due to the generated code appearing as:

int main()
{
    struct FOO* s;
    s->MEMBER;
    return 0;
}

See the attached patch for a fix. Don't know whether some -std flag will also
bail out on int main() rather than int main(void), but that's a different issue.
This one is about breakage due to very strict warnings on a modern compiler (GCC
4.9.1).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-10-10 17:46 Lekensteyn     New Issue                                    
2014-10-10 17:46 Lekensteyn     File Added:
0001-CheckStructHasMember-avoid-breakage-on-Wall.patch                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to