From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6404 invoked by alias); 20 May 2011 06:20:49 -0000 Received: (qmail 6394 invoked by uid 22791); 20 May 2011 06:20:48 -0000 X-SWARE-Spam-Status: No, hits=2.6 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_DNSWL_NONE,TW_CX,T_HK_NAME_DR X-Spam-Check-By: sourceware.org Received: from out1.ip04ir2.opaltelecom.net (HELO out1.ip04ir2.opaltelecom.net) (62.24.128.240) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 May 2011 06:20:33 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmkGAPoG1k3UQ3ln/2dsb2JhbACYHI50iGkHvUSGGQSQEYcrh0s Received: from oasis-out-b.onetel.net.uk (HELO sgrsil49.onetel.net.uk) ([212.67.121.103]) by out1.ip04ir2.opaltelecom.net with ESMTP; 20 May 2011 07:20:32 +0100 Message-ID: <4DD6082A.4040900@onetel.net> Date: Fri, 20 May 2011 06:50:00 -0000 From: "Dr. David Kirkby" User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.7) Gecko/20100214 Thunderbird/3.0.1 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: __gnu_cxx error in OpenSolaris References: <62890.10.0.66.17.1305752970.squirrel@interact.purplecow.org> <4DD4B6FD.80803@onetel.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00296.txt.bz2 On 05/19/11 09:09 PM, Jonathan Wakely wrote: > On 19 May 2011 20:03, David Kirkby wrote: > I thought we were talking about C++ (my first clue was the subject of > the thread and your mention of "GNU C++") > Throughout your reply you only refer to C, which I'm not qualified or > interested enough to comment on. But for many practical purposes C++ is a superset of C, so g++ inherits the same GNUims as gcc. For example: #include using namespace std; int main() { int a=0b1111111; cout << a; } compiles with g++, but is not valid C++. There's not even a warning if -Wall is used drkirkby@hawk:~$ g++ -Wall test.cc drkirkby@hawk:~$ The Sun compiler quickly identifies this as invalid C++ code. drkirkby@hawk:~$ CC test.cc "test.cc", line 5: Error: 0b is not a valid constant. "test.cc", line 5: Error: Badly formed expression. 2 Error(s) detected. > I'm very interested in making G++ conform to the C++ standard as well > as possible and only objected to the assertion that G++ users don't > care about writing standard C++. My point is the GNU compilers allow constructs which are not standard. Anyone starting a C++ project and wishing for it to be standard C++, should not use g++. -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?