-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler errors with aggressive warnings enabled #140
Comments
jiverson002
added a commit
to jiverson002/Celero
that referenced
this issue
Mar 28, 2020
In file include/celero/ThreadLocal.h: * `thread_local` is a C++ keyword so using an #ifdef check for its existence is not reliable. Instead, check for C++11 support to determine if `thread_local` is already defined. See here https://stackoverflow.com/questions/5047971/how-do-i-check-for-c11-support. * Also the check `#if __STDC_VERSION__ >= 201112` is not meaningful, since presumably Celero is being compiled with a C++ compiler, so it has been removed. In file src/Memory.cpp: * Added include for `<cstring>` so that `strlen` and `strncmp` are defined for Apple environment. Fixes DigitalInBlue#140
DigitalInBlue
pushed a commit
that referenced
this issue
Mar 28, 2020
In file include/celero/ThreadLocal.h: * `thread_local` is a C++ keyword so using an #ifdef check for its existence is not reliable. Instead, check for C++11 support to determine if `thread_local` is already defined. See here https://stackoverflow.com/questions/5047971/how-do-i-check-for-c11-support. * Also the check `#if __STDC_VERSION__ >= 201112` is not meaningful, since presumably Celero is being compiled with a C++ compiler, so it has been removed. In file src/Memory.cpp: * Added include for `<cstring>` so that `strlen` and `strncmp` are defined for Apple environment. Fixes #140
DigitalInBlue
added a commit
that referenced
this issue
Feb 24, 2021
* Use _WIN32 instead of WIN32 preprocessor macro (#138) - _WIN32 is the recommended preprocessor macro - Substitute occurrences of WIN32 with _WIN32 using: git grep -lw -e 'WIN32' -- | xargs sed -i -e 's/\<WIN32\>/_WIN32/g' * Cleanup some compiler issues on MacOS. (#141) In file include/celero/ThreadLocal.h: * `thread_local` is a C++ keyword so using an #ifdef check for its existence is not reliable. Instead, check for C++11 support to determine if `thread_local` is already defined. See here https://stackoverflow.com/questions/5047971/how-do-i-check-for-c11-support. * Also the check `#if __STDC_VERSION__ >= 201112` is not meaningful, since presumably Celero is being compiled with a C++ compiler, so it has been removed. In file src/Memory.cpp: * Added include for `<cstring>` so that `strlen` and `strncmp` are defined for Apple environment. Fixes #140 * Made it easier to use the Fixed baseline properly with UDMs. * Improving the "cost of pimpl" experiment. * #148 Added UDM to the output file Also remove Google Test submodule. * Create codeql-analysis.yml (#149) * Removed requirement for GTest in Travis.ci * #143 Added clarification to README.md on Doxygen. * Code Cleanup * Copyright Update 2021 Co-authored-by: Wolfgang Stöggl <c72578@yahoo.de> Co-authored-by: jiverson002 <jiverson002@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiling with Clang on MacOS and compiler options
-Wall -Wextra -pedantic -Werror
produces the following error:thread_local
is a C++11 keyword, so it seems that the checkCelero/include/celero/ThreadLocal.h
Line 22 in ce3b5a3
will be incorrect whenever
thread_local
is not defined as a macro.Compiling with G++ on MacOS and compiler options
-Wall -Wextra -pedantic -Werror
produces the following error:and many more like it.
Looks like
Memory.cpp
is missing#include <cstring>
.The text was updated successfully, but these errors were encountered: