Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
5946795e
Commit
5946795e
authored
Jul 03, 2018
by
Federico Ficarelli
Committed by
Dominic Hamon
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable Intel invalid offsetof warning (#629)
parent
847c0069
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
benchmark.cc
src/benchmark.cc
+7
-2
No files found.
src/benchmark.cc
View file @
5946795e
...
@@ -319,7 +319,10 @@ State::State(size_t max_iters, const std::vector<int64_t>& ranges, int thread_i,
...
@@ -319,7 +319,10 @@ State::State(size_t max_iters, const std::vector<int64_t>& ranges, int thread_i,
// demonstrated since constexpr evaluation must diagnose all undefined
// demonstrated since constexpr evaluation must diagnose all undefined
// behavior). However, GCC and Clang also warn about this use of offsetof,
// behavior). However, GCC and Clang also warn about this use of offsetof,
// which must be suppressed.
// which must be suppressed.
#ifdef __GNUC__
#if defined(__INTEL_COMPILER)
#pragma warning push
#pragma warning(disable:1875)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif
#endif
...
@@ -328,7 +331,9 @@ State::State(size_t max_iters, const std::vector<int64_t>& ranges, int thread_i,
...
@@ -328,7 +331,9 @@ State::State(size_t max_iters, const std::vector<int64_t>& ranges, int thread_i,
static_assert
(
offsetof
(
State
,
error_occurred_
)
<=
static_assert
(
offsetof
(
State
,
error_occurred_
)
<=
(
cache_line_size
-
sizeof
(
error_occurred_
)),
(
cache_line_size
-
sizeof
(
error_occurred_
)),
""
);
""
);
#ifdef __GNUC__
#if defined(__INTEL_COMPILER)
#pragma warning pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
#endif
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment