Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Feedback for a malloc implementation Date: Wed, 20 Jul 2016 09:28:48 -0700 Organization: None to speak of Lines: 38 Message-ID: References: <53ccbf4e-2d12-4d86-9af1-9062ff002f9c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="6137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19omzwfFB2dgGeYvDN/AIGF" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:0Y5giXe8Q5hRcMdHPWTem9Ailac= sha1:1JyamYgW3HUo+Fyzinsx5OBaGdg= Xref: csiph.com comp.lang.c:90671 Tim Rentsch writes: [...] > I followed your directions and checked out the distribution > branch. No problem running cmake. But then the make failed. > Here is the first error message (please excuse my wrapping the > long lines): > > [ 21%] Building CXX object test/CMakeFiles/tMallocPerfRef.dir/tMallocPerf.cpp.o > In file included from /usr/include/c++/4.8/thread:35:0, > from /opt/software/git/akmalloc/test/tMallocPerf.cpp:307: > /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file > requires compiler and library support for the ISO\ > C++ 2011 standard. This support is currently experimental, and must be > enabled with the -std=c++11 or -std=gnu++11 compi\ > ler options. > #error This file requires compiler and library support for the \ > ^ (This is arguably off-topic, but ...) The versions of C and C++ supported by gcc and g++ by default have changed with recent releases. With the 4.8 version you're using, the defaults are -std=gnu90 and -std=gnu++98. gcc release 5 (I checked 5.3.0) changed the default for C to -std=gnu11, and release 6 (I checked 6.1.0) changed the default for C++ to -std=gnu++14. It's likely that you wouldn't encounter the above error if you used gcc release 6 (you'd probably have to install it yourself). The Makefile (and/or whatever cmake uses) should be updated to specify the standard to use by passing the proper option to the gcc and g++ commands. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"