X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:to:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=agV LiL/dk9PPiMPy7ho6Ig04xmeOKhjQlcOg+3sF5hqFvQMHJAuO9ZEWpKTCJES9+9R lW97EjeLXPM5OcEORADKF0HrtsCI9MVXgz/inOw02Cc/9h5EAnBDnv9bwpSDZarx CC40dE05mF8uwCTbFZgP782491OksmifUxgYC5H8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:subject:to:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=uU/6gio6q Tq0Ru7xqCw6FHErhjQ=; b=qYn3Fmj1jQunU27ZzQ9KEql0wnPW7pIliVjq7X+fv +TMgs2BK9L/DKTh8/rw2Y7NhU+HCALi4KBNBPMZ9J2Wp9+QdvQpZg6Br/foNVwyg 8WILp0Y8uiE1VMwOY1KllgLUgbQ2Cy9zjop3O/8NBqIwcC1QMCAFXG3FAVdhw8/q eE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.8 required=5.0 tests=AWL,BAYES_50,CHARSET_FARAWAY_HEADER,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtpout.ngs.ru From: "=?KOI8-R?Q?=F2=CF=CD=C1=CE?=" Subject: Re: Errors in handling of boost::asio errors ('boost' was compiled with wrong std::string representation?) To: cygwin AT cygwin DOT com Date: Mon, 23 Nov 2015 22:32:29 +0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="KOI8-R"; format="flowed" Content-Transfer-Encoding: 8bit X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 75324 [Mar 30 2015] X-KLMS-AntiSpam-Version: 5.5.4 X-KLMS-AntiSpam-Envelope-From: rod1gin AT ngs DOT ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Info: LuaCore: 175 2015-03-18_14-10-30 59b0fb5d1fe0bc13ab72a23d6aa445f4185e0a58, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2015/03/25 07:44:58 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.705, bases: 2015/03/29 19:07:00 #10436451 X-KLMS-AntiVirus-Status: Clean, skipped John Hein wrote at 10:22 -0700 on Nov 22, 2015: > Use 'size=%zu'. And get into the habit of compiling with -Wall 1) My apology for inaccuracy. 2) Usually, I use -Wall, but omits it for brevity. 3) GCC cannot warn for "%zu" - "%lu" mismatch. But it can warn if I confuse "%u" with "%s". 4) The problem is still here: --------------- begin of the code #include #include int main() { boost::asio::ip::address_v4 a; boost::system::error_code ec; a.from_string("127.0.0.1111", ec); std::string s = ec.message(); printf("size=%zu, c_str=\"%s\".\n", s.size(), s.c_str()); return 0; } --------------- end of the code --------------- begin of the output size=6444086549, c_str="Invalid argument". --------------- end of the output Windows 7, 64-bit, russian language. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple