This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vector<bool> _M_start and 0 offset


On 17/09/18 21:18 +0200, Marc Glisse wrote:
On Mon, 17 Sep 2018, Jonathan Wakely wrote:

Do other compilers besides gcc suppress the same way?

No, clang doesn't:

What version is that? I didn't test on this exact patch, but clang 6 and
7 print, for similar code:

warning: generalized initializer lists are a C++11 extension
     [-Wc++11-extensions]

A 5 month old build from the source repo:

clang version 7.0.0 (https://git.llvm.org/git/clang.git 1a4f56e161a5ab24aa022f7e8a754e71fa5347a1) (https://git.llvm.org/git/llvm.git afb8c1fed21eb4848d86f2d28e9cb3afcfbb2656)

With -Wsystem-headers it gives the -Wc++11-extensions warning, but if
the begin() member function is actually called then it gives the
error, even without -Wsystem-headers.


So I do think we should stick to C++98 syntax.

What is the oldest version of clang we are supposed to support? I
thought historically we mostly supported whatever version of clang was
released *after* (i.e. clang does the support).

There's no precise policy. I generally try to keep the most recent one
or two releases working though.

But usually when we introduce something that needs a recent Clang it's
bleeding edge stuff like new C++17 or C++2a support. In that case, I
think it's fine to require a new Clang to use new libstdc++ headers.
For std::vector<bool> in C++98 mode it would be unfortunate to require
the latest and greatest version.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]