benchmark/src
Eric Fiselier e668e2a1ba Fix #552 - GCC and Clang warn on possibly invalid offsetof usage.
This patch disables the -Winvalid-offsetof warning for GCC and Clang
when using it to check the cache lines of the State object.

Technically this usage of offsetof is undefined behavior until C++17.
However, all major compilers support this application as an extension,
as demonstrated by the passing static assert (If a compiler encounters UB
during evaluation of a constant expression, that UB must be diagnosed).
Unfortunately, Clang and GCC also produce a warning about it.

This patch temporarily suppresses the warning using #pragma's in the
source file (instead of globally suppressing the warning in the build systems).
This way the warning is ignored for both CMake and Bazel builds without
having to modify either build system.
2018-03-21 13:47:25 -06:00
..
arraysize.h Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
benchmark_api_internal.h Drop Stat1, refactor statistics to be user-providable, add median. (#428) 2017-08-23 16:44:29 -07:00
benchmark_register.cc Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
benchmark.cc Fix #552 - GCC and Clang warn on possibly invalid offsetof usage. 2018-03-21 13:47:25 -06:00
check.h CHECK(): rename EPS to FLOAT for consistency with googletest style. 2017-05-01 23:01:10 +01:00
CMakeLists.txt Add Solaris support (#539) 2018-03-02 03:53:58 -08:00
colorprint.cc fix android compilation (#372) 2017-04-18 09:48:07 -06:00
colorprint.h Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
commandlineflags.cc Google-style cleanups (#416) 2017-07-13 18:33:43 +02:00
commandlineflags.h Auto-detect whether Benchmark should produce colorized output (#126) 2016-09-15 15:10:35 -06:00
complexity.cc Spelling fixes (#543) 2018-03-06 11:44:25 +00:00
complexity.h Drop Stat1, refactor statistics to be user-providable, add median. (#428) 2017-08-23 16:44:29 -07:00
console_reporter.cc Console reporter: properly account for the lenght of custom counter names (#484) 2017-11-27 09:01:01 -08:00
counter.cc Merge remote-tracking branch 'upstream/master' into compact 2017-05-02 18:54:37 +01:00
counter.h Make Benchmark a single header library (but not header-only) (#407) 2017-07-04 16:31:47 -06:00
csv_reporter.cc more clang tidy cleanups (#417) 2017-07-15 00:21:20 +02:00
cycleclock.h Use STCK to get the CPU clock on s390x (#540) 2018-03-02 03:22:03 -08:00
internal_macros.h Add Solaris support (#539) 2018-03-02 03:53:58 -08:00
json_reporter.cc Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
log.h Make Benchmark a single header library (but not header-only) (#407) 2017-07-04 16:31:47 -06:00
mutex.h Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
re.h Add support for building w/o exceptions (#317) 2016-12-05 09:24:09 -08:00
reporter.cc Print the executable name as part of the context. (#534) 2018-02-21 08:43:57 -08:00
sleep.cc Replace int64_t usages with 'int' instead. (#359) 2017-03-27 18:32:12 -06:00
sleep.h Replace int64_t usages with 'int' instead. (#359) 2017-03-27 18:32:12 -06:00
statistics.cc Some small clang-tidy fixes (#520) 2018-01-29 08:38:47 -08:00
statistics.h Drop Stat1, refactor statistics to be user-providable, add median. (#428) 2017-08-23 16:44:29 -07:00
string_util.cc Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
string_util.h Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
sysinfo.cc Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
thread_manager.h Move thread classes out to clean up monolithic code (#554) 2018-03-16 10:14:38 +00:00
thread_timer.h Move thread classes out to clean up monolithic code (#554) 2018-03-16 10:14:38 +00:00
timers.cc Make string_util naming more consistent (#547) 2018-03-07 11:20:06 +00:00
timers.h Make PauseTiming() and ResumeTiming() per thread. (#286) 2016-09-02 21:34:34 -06:00