Enable and fix warnings during the build.
authorEric Fiselier <eric@efcs.ca>
Sat, 18 Jul 2015 20:40:46 +0000 (20:40 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 18 Jul 2015 20:40:46 +0000 (20:40 +0000)
commit87a82490fc6b89fd3dfe033054e1bdc6b87fd9f4
treea46ba3cd7c970a70e9b3dd8c5c7cc40b7aada192
parenta1e0aa5020209dad9c03a4dfa704a138e9ce89b5
Enable and fix warnings during the build.

Although CMake adds warning flags, they are ignored in the libc++ headers
because the headers '#pragma system header' themselves.

This patch disables the system header pragma when building libc++ and fixes
the warnings that arose.

The warnings fixed were:
1. <memory> - anonymous structs are a GNU extension
2. <functional> - anonymous structs are a GNU extension.
3. <__hash_table> - Embedded preprocessor directives have undefined behavior.
4. <string> - Definition is missing noexcept from declaration.
5. <__std_stream> - Unused variable.

llvm-svn: 242623
libcxx/CMakeLists.txt
libcxx/include/__hash_table
libcxx/include/__std_stream
libcxx/include/functional
libcxx/include/memory
libcxx/include/string