From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20853 invoked by alias); 31 Aug 2010 18:29:54 -0000 Received: (qmail 20843 invoked by uid 22791); 31 Aug 2010 18:29:53 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_CC,TW_PL,T_RP_MATCHES_RCVD,T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 18:29:49 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id o7VITkNG030611 for ; Tue, 31 Aug 2010 11:29:47 -0700 Received: from yxd5 (yxd5.prod.google.com [10.190.1.197]) by wpaz5.hot.corp.google.com with ESMTP id o7VITd7c020973 for ; Tue, 31 Aug 2010 11:29:45 -0700 Received: by yxd5 with SMTP id 5so1626246yxd.9 for ; Tue, 31 Aug 2010 11:29:44 -0700 (PDT) Received: by 10.151.26.3 with SMTP id d3mr336543ybj.291.1283279384892; Tue, 31 Aug 2010 11:29:44 -0700 (PDT) Received: from coign.google.com (dhcp-172-22-124-178.mtv.corp.google.com [172.22.124.178]) by mx.google.com with ESMTPS id g31sm9061528ibh.16.2010.08.31.11.29.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 11:29:43 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: [gccgo] Mention function name in cmplx type error Date: Tue, 31 Aug 2010 19:36:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg02204.txt.bz2 --=-=-= Content-length: 167 This small patch changes gccgo to mention the function name when reporting a type error in the use of the predeclared function cmplx. Committed to gccgo branch. Ian --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=foo.patch Content-Description: cmplx Content-length: 672 diff -r 79786d3fc04a go/expressions.cc --- a/go/expressions.cc Tue Aug 31 11:08:59 2010 -0700 +++ b/go/expressions.cc Tue Aug 31 11:27:25 2010 -0700 @@ -7083,9 +7083,10 @@ this->set_is_error(); else if (!Type::are_identical(args->front()->type(), args->back()->type(), NULL)) - this->report_error(_("arguments must have identical types")); + this->report_error(_("cmplx arguments must have identical types")); else if (args->front()->type()->float_type() == NULL) - this->report_error(_("arguments must have floating-point type")); + this->report_error(_("cmplx arguments must have " + "floating-point type")); } break; --=-=-=--