This is the mail archive of the 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: C++ ABI RFC [was Re: C++/libiberty PATCH for many mangling fixes (6057, 48051, 50855, 51322, etc)]

On 12 January 2012 19:16, Benjamin Kosnik wrote:
> I think a compelling case could be made to ship 4.7 with a
> configure-time flag that sets the default C++ dialect to C++11.
> So, I would propose
> --with-std = dialect
> or
> --with-std-version=c dialect default, c++ dialect default
> be added to the top-level gcc configure and documented here:
> as:
> --with-std=dialect[,dialect]
> ? ?Specify a string that identifies the -std=dialect defaults for the
> ? ?built compiler and any associated runtimes. Default values are
> ? ?gnu99, g++98. For example, -std=gnu11,gnu++11 would build a
> ? ?compiler whose default language standards for "C" and C++ would be
> ? ?the GNU extensions to the C11 and C++11 standards.

I like the idea, but not very strongly.  I can live with having to say
-std=c++11 (which I do via shell functions or scripts)

My completely unfounded prediction is that many G++ users will move to
C++11 a lot quicker than the C community moved to C99.

> Then, I believe for C++ targets defaulting to C++11, then the language
> would be set to -fabi-version=6 and any other changes, and for the
> library, we'd use .so.7 and namespace versioning, and do the
> basic_string swap to __gnu_cxx::__versa_string (or alias it? hmm....)
> and any other changes.

As an aside, how do you feel about starting to make those ABI breaking
changes in the __7 versioned namespace?  There are changes we know we
need to make for C++11 conformance, but can't without breaking the
ABI.  If users explicitly select an incompatible ABI via the versioned
namespace and .so.7 then there's no reason not to give them the best
possible C++11 support we can, right?

And if we are going to do that, shouldn't it be ASAP? Otherwise we'll
not be able to change anything significant in .so.7 once it's
available in 4.7 and we'll have to create a .so.8 for more changes..

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