See the mail thread starting at http://lists.llvm.org/pipermail/cfe-dev/2017-July/054666.html "[cfe-dev] -pedantic warnings in system headers?":
The assert.h in glibc 2.25 defines assert as a GNU-extension "statement expression", see https://sourceware.org/git/?p=glibc.git;a=commit;h=e077349ce589466eecd47213db4fae6b80ec18c4 "assert.h: allow gcc to detect assert(a = 1) errors". That caused Clang -pedantic to emit -Wgnu-statement-expression warnings (unlike GCC).
This patch extends the heuristic when to suppress warnings in system headers, to also suppress warnings about extensions used in the body of a function-like macro defined in a system header. (The "function-like" part is there so that the warning from the body of LONG_LONG_MAX in clang/test/CXX/drs/dr4xx.cpp is still emitted.)
I ran into this when trying to build CoinMP (which wants to be built with -pedantic-errors) as part of building LibreOffice master with Clang trunk against Fedora 26 glibc. I'm not sure what the best solution is, though: Either extend the heuristic when to suppress warnings as done here (which has the benefit of aligning the behavior with GCC), or change the CoinMP build system to not insist on -pedantic-error.