From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25615 invoked by alias); 8 Oct 2011 02:35:35 -0000 Received: (qmail 25403 invoked by uid 22791); 8 Oct 2011 02:35:34 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f47.google.com (HELO mail-bw0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 08 Oct 2011 02:35:18 +0000 Received: by bke11 with SMTP id 11so6102257bke.20 for ; Fri, 07 Oct 2011 19:35:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.15.25 with SMTP id i25mr14901888faa.31.1318041317467; Fri, 07 Oct 2011 19:35:17 -0700 (PDT) Received: by 10.152.20.66 with HTTP; Fri, 7 Oct 2011 19:35:17 -0700 (PDT) In-Reply-To: <59662D5BB74CD84D9FA8E6491ADB51A7DEAE4E3D@US01WXMBX1.internal.synopsys.com> References: <59662D5BB74CD84D9FA8E6491ADB51A7DEAE4E3D@US01WXMBX1.internal.synopsys.com> Date: Sat, 08 Oct 2011 07:34:00 -0000 Message-ID: Subject: Re: Long-term plan for C++98/C++11 incompatibility From: Gabriel Dos Reis To: Joe Buck Cc: James Y Knight , "gcc@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00122.txt.bz2 On Fri, Oct 7, 2011 at 9:16 PM, Joe Buck wrote: > On Fri, Oct 7, 2011 at 5:24 PM, James Y Knight wrote: > >> I guess to start, it would have been nice if there was a big warning on >> http://gcc.gnu.org/projects/cxx0x.html telling me not to use c++0x mode >> unless there are no objects compiled with c++98 linked into the same >> executable. > > Gabriel Dos Reis [gdr@integrable-solutions.net] wrote: >> I was under the impression c++0x was explicitly documented as experimental. > > Yes. But I hope that some thought is devoted to figuring out how this problem > can be dealt with when c++11 support is transitioned to a fully supported feature. C++11 is essentially binary incompatible with C++98. The best thing people should do is to take it seriously that that they should not attempt to mix or play loose. > Eventually there would need to be one libstdc++ that programs link against and > run whether they use c++98 or c++11. I would expect there to be restrictions, > but it's a problem that eventually needs to be tackled. My opinion is that it would an exercise in futility, frustration, and possibly deception to try to make people believe that there are sets of simple rules they can follow to mix their C++98 binaries with fully compatible C++11 library. They would have to recompile the source code.