From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24764 invoked by alias); 11 Oct 2011 16:48:23 -0000 Received: (qmail 24756 invoked by uid 22791); 11 Oct 2011 16:48:21 -0000 X-SWARE-Spam-Status: No, hits=2.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,STOX_REPLY_TYPE X-Spam-Check-By: sourceware.org Received: from blu0-omc4-s12.blu0.hotmail.com (HELO blu0-omc4-s12.blu0.hotmail.com) (65.55.111.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Oct 2011 16:48:06 +0000 Received: from BLU0-SMTP66 ([65.55.111.137]) by blu0-omc4-s12.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 11 Oct 2011 09:48:05 -0700 Message-ID: Received: from wclark162vbox ([84.178.58.132]) by BLU0-SMTP66.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 11 Oct 2011 09:48:05 -0700 From: Andy Gibbs To: "Ian Lance Taylor" , References: Subject: Re: __builtin_choose_expr Date: Tue, 11 Oct 2011 16:48:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit 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-10/txt/msg00081.txt.bz2 On Monday, October 10, 2011 9:16 PM, Ian Lance Taylor wrote: > The patch looks fine to me. You should move it to trunk and submit it > to gcc-patches. Thanks for checking it for me! I have done more work on it today so that it works correctly with templates as well. I will merge the patch now across to trunk and check that all my test-cases still work correctly and then put it forward to gcc-patches. The only area which I haven't successfully managed to implement __builting_choose_expr is in within an auto return type, for example: template constexpr auto test() -> decltype(__builtin_choose_expr(i, 1, 2)) { return __builtin_choose_expr(i, 1, 2); } GCC gives up with "sorry, unimplemented: mangling choose_expr" since I didn't think myself qualified to make alterations to GCC in this area. In honest, I'm not entirely sure that alterations should be necessary... but how to solve this, I don't know. > You will probably need to sign a copyright assignment; > let me know if you want to start that process. Yes, please, if you could point me in the right direction to do this. Many thanks Andy