[cmake-developers] [CMake 0015203]: CheckStructHasMember breaks on -Wunused-value
Mantis Bug Tracker
mantis at public.kitware.com
Fri Oct 10 17:46:51 EDT 2014
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
======================================================================
More information about the cmake-developers
mailing list