Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 22488 invoked from network); 2 Jun 2006 21:55:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jun 2006 21:55:18 -0000 Received: (qmail 56670 invoked by uid 500); 2 Jun 2006 21:55:11 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 53947 invoked by uid 500); 2 Jun 2006 21:54:59 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 49268 invoked by uid 99); 2 Jun 2006 21:54:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2006 14:54:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2006 14:26:05 -0700 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.4/8.13.4) with ESMTP id k52LPN3U023436 for ; Fri, 2 Jun 2006 21:25:24 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Jun 2006 15:25:54 -0600 Message-ID: <4480A0CF.2030401@roguewave.com> Date: Fri, 02 Jun 2006 14:34:23 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: Compiler Warning 552 with bitset References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Jun 2006 21:25:54.0233 (UTC) FILETIME=[2134EA90:01C6868B] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Craig Chariton wrote: > I am getting a compiler Warning 552 on HP-UX 11.11 with an A.03.63 > compiler. Here is the code that recreates the warning: > [...] > I am not seeing this with gcc on Linux. The code appears to run the > fine on in both cases. I was just wondering if this is a compiler issue > and, if so, is there any reason for concern? The answers are yes and no. The HP bug number is JAGaf00255. The details of the bug report are here: http://bugzilla.cvo.roguewave.com/show_bug.cgi?id=1536 There is no reason for concern, the compiler does the right thing despite the warning. The warning can be suppressed either via the compiler option +W552 or by #defining the configuration macro _RWSTD_NO_EXT_BITSET_TO_STRING and disabling the library feature that is giving the compiler trouble. Note that since stdcxx implements the resolution of issue 434 and also provides, as a conforming extension, an overloaded bitset ctor that takes a const char* argument, the program can be simplified like this: #include #include int main () { const char *a = "11"; const std::bitset<8> header(a); // stdcxx extension for (std::string::size_type i = 0; i < header.size (); ++i) { std::cout << header [i] << "\n"; } std::cout << header.to_string () << '\n'; // issue 434 } Here's issue 434: http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#434