From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3429 invoked by alias); 14 Jul 2009 13:33:19 -0000 Received: (qmail 3420 invoked by uid 22791); 14 Jul 2009 13:33:18 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Jul 2009 13:33:11 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id n6EDX8Yc011508 for ; Tue, 14 Jul 2009 06:33:09 -0700 Received: from pxi14 (pxi14.prod.google.com [10.243.27.14]) by wpaz37.hot.corp.google.com with ESMTP id n6EDX5gE006063 for ; Tue, 14 Jul 2009 06:33:06 -0700 Received: by pxi14 with SMTP id 14so177275pxi.13 for ; Tue, 14 Jul 2009 06:33:05 -0700 (PDT) Received: by 10.115.89.18 with SMTP id r18mr10993935wal.111.1247578384809; Tue, 14 Jul 2009 06:33:04 -0700 (PDT) Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id m30sm11024976wag.69.2009.07.14.06.33.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Jul 2009 06:33:04 -0700 (PDT) To: Stefan Lampe Cc: Mail-Followup-To: gcc-help@gcc.gnu.org Subject: Re: template instantiation and anonymous namespaces References: From: Ian Lance Taylor Date: Tue, 14 Jul 2009 13:33:00 -0000 In-Reply-To: (Stefan Lampe's message of "Tue\, 14 Jul 2009 08\:05\:13 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00243.txt.bz2 Stefan Lampe writes: > Here's some code that produced a surprising result with GCC 4.3.3 on > linux 64. I'd have expected all addresses output to be the same. This message should have gone to gcc-help@gcc.gnu.org rather than gcc@gcc.gnu.org. Please take any followups to gcc-help. Thanks. Your test case doesn't compile, so it's hard to be sure what is going on. The linker should normally merge template instantiations which have the same name, but making the function static may be causing it to be static in the file, and thus not merged. Ian