From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26216 invoked by alias); 19 Jan 2012 22:41:14 -0000 Received: (qmail 25430 invoked by uid 22791); 19 Jan 2012 22:41:13 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jan 2012 22:40:59 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 19 Jan 2012 14:40:58 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by orsmga002.jf.intel.com with ESMTP; 19 Jan 2012 14:40:58 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 785CBC275B; Thu, 19 Jan 2012 14:40:58 -0800 (PST) Date: Thu, 19 Jan 2012 22:41:00 -0000 From: "H.J. Lu" To: binutils@sourceware.org Cc: Ian Lance Taylor Subject: [gold] PATCH: Add typename on types used in template Message-ID: <20120119224058.GA18659@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00207.txt.bz2 Hi Ian, GCC 4.2 failed to compile gold: /net/gnu-6/export/gnu/import/git/binutils/gold/x86_64.cc: In member function ‘void::Target_x86_64::gc_process_relocs(gold::Symbol_table*, gold::Layout*, gold::Sized_relobj_file*, unsigned int, unsigned int, const unsigned char*, size_t, gold::Output_section*, bool, size_t, const unsigned char*) [with int size = 32]’: /net/gnu-6/export/gnu/import/git/binutils/gold/x86_64.cc:4175: instantiated from here /net/gnu-6/export/gnu/import/git/binutils/gold/x86_64.cc:2811: error: dependent-name ‘::Target_x86_64::Scan’ is parsed as a non-type, but instantiation yields a type /net/gnu-6/export/gnu/import/git/binutils/gold/x86_64.cc:2811: note: say ‘typename ::Target_x86_64::Scan’ if a type is meant This patch adds typename. OK to install? Thanks. H.J. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 62f79f5..649668a 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2012-01-22 H.J. Lu + + * x86_64.cc (gc_process_relocs): Add typename on types used in + template. + (scan_relocs): Likewise. + (relocate_section): Likewise. + (apply_relocation): Likewise. + 2012-01-10 H.J. Lu * x86_64.cc (Scan::check_non_pic): Allow R_X86_64_32 for x32. diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 3a2cace..df11441 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2809,8 +2809,8 @@ Target_x86_64::gc_process_relocs(Symbol_table* symtab, } gold::gc_process_relocs, elfcpp::SHT_RELA, - Target_x86_64::Scan, - Target_x86_64::Relocatable_size_for_reloc>( + typename Target_x86_64::Scan, + typename Target_x86_64::Relocatable_size_for_reloc>( symtab, layout, this, @@ -2848,7 +2848,7 @@ Target_x86_64::scan_relocs(Symbol_table* symtab, } gold::scan_relocs, elfcpp::SHT_RELA, - Target_x86_64::Scan>( + typename Target_x86_64::Scan>( symtab, layout, this, @@ -3780,7 +3780,7 @@ Target_x86_64::relocate_section( gold_assert(sh_type == elfcpp::SHT_RELA); gold::relocate_section, elfcpp::SHT_RELA, - Target_x86_64::Relocate>( + typename Target_x86_64::Relocate>( relinfo, this, prelocs, @@ -3809,7 +3809,7 @@ Target_x86_64::apply_relocation( section_size_type view_size) { gold::apply_relocation, - Target_x86_64::Relocate>( + typename Target_x86_64::Relocate>( relinfo, this, r_offset,