--- /dev/null
+Return-Path: <Vladimir.Marek@Oracle.COM>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id EC7BB431FAF\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Apr 2013 03:13:45 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.299\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id vTg4-tH3BV7L for <notmuch@notmuchmail.org>;\r
+ Sat, 27 Apr 2013 03:13:45 -0700 (PDT)\r
+Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 5803D431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Apr 2013 03:13:45 -0700 (PDT)\r
+Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])\r
+ by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with\r
+ ESMTP id r3RADZBZ008948\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);\r
+ Sat, 27 Apr 2013 10:13:35 GMT\r
+Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86])\r
+ by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id\r
+ r3RADWdT009868\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);\r
+ Sat, 27 Apr 2013 10:13:33 GMT\r
+Received: from ubhmt101.oracle.com (ubhmt101.oracle.com [156.151.24.6])\r
+ by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id\r
+ r3RADWFA020416; Sat, 27 Apr 2013 10:13:32 GMT\r
+Received: from pub.cz.oracle.com (/10.163.101.122)\r
+ by default (Oracle Beehive Gateway v4.0)\r
+ with ESMTP ; Sat, 27 Apr 2013 03:13:32 -0700\r
+Date: Sat, 27 Apr 2013 12:11:35 +0200\r
+From: Vladimir Marek <Vladimir.Marek@Oracle.COM>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>\r
+Subject: Re: [PATCH] don't store temporary value returned from c_str()\r
+Message-ID: <20130427101134.GI10394@pub.cz.oracle.com>\r
+Mail-Followup-To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org,\r
+ Vladimir Marek <vlmarek@volny.cz>\r
+References: <1366405933-17223-1-git-send-email-Vladimir.Marek@oracle.com>\r
+ <m2sj2cjp2b.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+In-Reply-To: <m2sj2cjp2b.fsf@guru.guru-group.fi>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Source-IP: acsinet21.oracle.com [141.146.126.237]\r
+Cc: notmuch@notmuchmail.org, Vladimir Marek <vlmarek@volny.cz>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 27 Apr 2013 10:13:46 -0000\r
+\r
+> > From: Vladimir Marek <vlmarek@volny.cz>\r
+> >\r
+> > This is causing problems when compiled by Oracle Studio. Memory pointed\r
+> > by (const char*)term was already changed once talloc_strdup was called.\r
+> \r
+> If that changes, I'd like to understand why (and stated in the commit\r
+> message). If that is clear to everyone else I will withdraw the question --\r
+> I am not too familiar with these iterators magic... :D\r
+\r
+Well, a) standards says that\r
+\r
+A temporary bound to a reference parameter in a function call (5.2.2)\r
+persists until the completion of the full expression containing the call\r
+\r
+(you can find the message all over the net, but I can't find actual link\r
+to the standard :-/)\r
+\r
+\r
+b) Imagine the function c_str() looks like that:\r
+\r
+const char*\r
+string::c_str(void) {\r
+ char buf[100];\r
+\r
+ strcpy (buf, this->internal_representation);\r
+ return buf;\r
+}\r
+\r
+you can't do:\r
+char *my_tmp = string.c_str();\r
+printf(my_tmp);\r
+\r
+you can do:\r
+printf(string.c_str());\r
+\r
+Hopefully I made the example right ...\r
+\r
+Cheers\r
+-- \r
+ Vlad\r