Fix Build: folly after replacing FOLLY_NORETURN
authorYedidya Feldblum <yfeldblum@fb.com>
Thu, 24 Mar 2016 01:07:02 +0000 (18:07 -0700)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Thu, 24 Mar 2016 01:20:20 +0000 (18:20 -0700)
commit7ea8b939596272f3d3ac33103dfab3429f4c971d
treee97a4251348e1e77e76265f7cccc2f80390915d8
parent9895ee085d445ae3ae6becdddfb9c8f9d8f6c1f5
Fix Build: folly after replacing FOLLY_NORETURN

Summary:[Folly] Fix Build: `folly` after replacing `FOLLY_NORETURN`.

Problem 1:
* Clang does not treat `[[noreturn]]` and `__attribute__((__noreturn__))` as the same attribute. When a function is declared twice with the noreturn attribute, both declarations must use either the one syntax or the other; Clang fails if the two declarations mix-and-match. When both `folly/detail/FunctionalExcept.h` and gcc49's `bits/functexcept.h` are both included from the same source, they (now) mix-and-match the attribute syntaxes and Clang emits an error.
* `folly/detail/FunctionalExcept.h` should be included only when `bits/functexcept.h` is unavailable - somehow, both headers were being included.

We fix the latter problem and keep our `[[noreturn]]` syntax.

Found from WDT build failures in Travis CI.

Reviewed By: ldemailly

Differential Revision: D3089987

fb-gh-sync-id: 705a087fc2a9629739d6cedd8315d56111204e6d
shipit-source-id: 705a087fc2a9629739d6cedd8315d56111204e6d
folly/Makefile.am
folly/configure.ac