Bug 1120995 - [PATCH] Fixes clang's "no member named 'max_align_t' error with gcc 4.9's cstddef
Summary: [PATCH] Fixes clang's "no member named 'max_align_t' error with gcc 4.9's cst...
Keywords:
Status: CLOSED DUPLICATE of bug 1092622
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-18 06:08 UTC by Andrew Gunnerson
Modified: 2014-12-26 01:33 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-12-26 01:33:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Upstream fix http://reviews.llvm.org/rL201729 (5.13 KB, patch)
2014-07-18 06:08 UTC, Andrew Gunnerson
no flags Details | Diff

Description Andrew Gunnerson 2014-07-18 06:08:53 UTC
Created attachment 918972 [details]
Upstream fix http://reviews.llvm.org/rL201729

Description of problem:

After gcc was updated to 4.9, clang is no longer able to compile cstddef. For example, this simple program:

--------------------------------
#include <boost/format.hpp>

int main(int argc, char **argv[]) {
    auto s = boost::format("");
    return 0;
}
--------------------------------

compiled with "clang++ -std=c++11 test.cpp" results in the following error:

--------------------------------
In file included from test.cpp:1:
In file included from /usr/include/boost/format.hpp:19:
In file included from /usr/include/boost/detail/workaround.hpp:41:
In file included from /usr/include/boost/config.hpp:40:
In file included from /usr/include/boost/config/select_stdlib_config.hpp:18:
/usr/bin/../lib/gcc/x86_64-redhat-linux/4.9.0/../../../../include/c++/4.9.0/cstddef:51:11: error: 
      no member named 'max_align_t' in the global namespace
  using ::max_align_t;
        ~~^
test.cpp:3:5: error: second parameter of 'main' (argument array) must be of type
      'char **'
int main(int argc, char **argv[]) {
    ^
2 errors generated.
--------------------------------


Version-Release number of selected component (if applicable):

gcc-4.9.0-15.fc21.x86_64
clang-3.4-11.fc21.x86_64


Additional info:

This has already been fixed upstream at http://reviews.llvm.org/rL201729 and it applies cleanly to the clang-3.4 sources. I've attached a copy of the upstream diff to this bug report.

(More info at Arch Linux bug tracker too: https://bugs.archlinux.org/task/40229)

Comment 1 Adam Jackson 2014-11-19 16:28:22 UTC
Reassign to nobody@.  I have no time and no interest in working on clang, and the only reason it's even in the llvm package is because it can't be built any other way.

If anyone wishes to volunteer for comaintainer with a focus on clang, please let me know (preferably with direct email, if it's in bz I'll likely miss the request), I'll be happy to hook you up.

Comment 2 Jan Včelák 2014-12-26 01:33:31 UTC

*** This bug has been marked as a duplicate of bug 1092622 ***


Note You need to log in before you can comment on or make changes to this bug.