From dev-return-8800-apmail-stdcxx-dev-archive=stdcxx.apache.org@stdcxx.apache.org Tue Sep 25 23:51:22 2012 Return-Path: X-Original-To: apmail-stdcxx-dev-archive@www.apache.org Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CA36D2CC for ; Tue, 25 Sep 2012 23:51:22 +0000 (UTC) Received: (qmail 29725 invoked by uid 500); 25 Sep 2012 23:51:22 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 29667 invoked by uid 500); 25 Sep 2012 23:51:21 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 29659 invoked by uid 99); 25 Sep 2012 23:51:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 23:51:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 209.85.160.54 as permitted sender) Received: from [209.85.160.54] (HELO mail-pb0-f54.google.com) (209.85.160.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 23:51:13 +0000 Received: by pbbrp8 with SMTP id rp8so902933pbb.41 for ; Tue, 25 Sep 2012 16:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=xOm4ZmzsihRWYFqPXSeG//wxPZvcLwQTJSGfIfpiYS0=; b=utMsIHDnFJfHSQ1OZdxQTbz4i/Bbhwn5HAgsYh24zdcONDgpwdIhvd6ZoPAkgan+aL WdWRLuZqmSdjb2lecDQ1tGmhzYYnMXXkX5ez25qNzjg6G+CoSqYJEL7sUbWIPWDI4F8y ydHzdRPxQlpbXpLIOJvYuct6rXbdSL8/f+fzTejbpm2iiczO+hB+UvvLeBBrnUCqgKLJ tNEtKNxXRmRXwftg4kzM0AxGVicJEGtKbCvqTq6964JtWKaY5y2OqO0ey2qX2EgN8get YbzxYZjQuXyyFjYr8UmAwOTD6axygk5hqNqaSQzEMTenKuislXHsQBA83t6Ii/993qla m52w== Received: by 10.68.227.162 with SMTP id sb2mr37266873pbc.4.1348617053217; Tue, 25 Sep 2012 16:50:53 -0700 (PDT) Received: from localhost.localdomain (72-163-0-129.cisco.com. [72.163.0.129]) by mx.google.com with ESMTPS id bj7sm867403pab.24.2012.09.25.16.50.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 16:50:52 -0700 (PDT) Message-ID: <5062435A.7030903@gmail.com> Date: Tue, 25 Sep 2012 17:50:50 -0600 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: dev@stdcxx.apache.org CC: Liviu Nicoara Subject: Re: STDCXX-1070 References: <5062183F.8020209@hates.ms> In-Reply-To: <5062183F.8020209@hates.ms> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/25/2012 02:46 PM, Liviu Nicoara wrote: > I filed 1070, failure to build 22.locale.collate.cpp on Linux with gcc > 4.7.1. Gcc, Comeau and Clang fail to compile it, Intel and Sun are fine. > It looks to me like Intel and Sun compilers are not doing the right > thing. A small test case and a patch have been attached. The failing > code has been reduced to: I agree that the test case is ill-formed and requires a diagnostic. I haven't looked at the test so just to make sure the test case does reflect the problem there: the well-formedness depends on whether charT is a class type. If so, then the code would be okay because g() would be found via associated namespace lookup. I.e., this would be fine: template void f () { g (charT ()); } template void g (charT) { } struct S { }; void h () { f(); } Martin > > $ cat test.cpp; g++ -c test.cpp > template < class charT > > void f () > { > g (charT ('a')); > } > > template < class charT > > void g (charT) > { > } > > int h () > { > return f< char > (), 0; > } > test.cpp: In instantiation of 'void f() \[with charT = char\]': > test.cpp:14:23: required from here > test.cpp:4:5: error: 'g' was not declared in this scope, and no > declarations were found by argument-dependent lookup at the point of > instantiation \[-fpermissive\] > test.cpp:8:6: note: 'template void g(charT)' declared here, > later in the translation unit > > Liviu