From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8748 invoked by alias); 23 Sep 2004 19:00:26 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 8732 invoked from network); 23 Sep 2004 19:00:25 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 23 Sep 2004 19:00:25 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 182BDC59557 for ; Thu, 23 Sep 2004 20:56:42 +0200 (CEST) Received: from aj by arthur.inka.de with local (Exim 4.30) id 1CAYlj-0002Ka-NN for libc-hacker@sources.redhat.com; Thu, 23 Sep 2004 20:56:39 +0200 To: Glibc hackers Subject: remove static from inline functions in local scope for GCC 4.0 From: Andreas Jaeger Date: Thu, 23 Sep 2004 19:00:00 -0000 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2004-09/txt/msg00086.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 8216 With the following updated patch (Roland asked me to use auto for the functions), I have now successfully build all of glibc with GCC 4.0 (CVS version of 12 hours ago) on Linux/AMD64. The testsuite fails for some tests, e.g. localedata/tst-leaks.out, but at least GCC builds glibc again... Tested with GCC 3.4, 3.3-hammer-branch and 4.0-CVS on Linux/AMD64. Ok to commit? Andreas 2004-09-23 Andreas Jaeger * sysdeps/x86_64/dl-machine.h (elf_machine_rela_relative): Remove static, add always_inline attribute. (elf_machine_rela): Likewise. (elf_machine_lazy_rel): Likewise. * elf/dynamic-link.h (elf_get_dynamic_info): Make static dependend on !RESOLVE so that it's not defined in local scope. * locale/weight.h (findidx): Remove static, it's not supported anymore with GCC 3.5 in a block scope. * locale/weightwc.h (findidx): Likewise. * posix/regcomp.c (seek_collating_symbol_entry): Likewise. (lookup_collation_sequence_value): Likewise. (build_range_exp): Likewise. (build_collating_symbol): Likewise. * iconv/iconvconfig.c (write_output): Likewise. * elf/do-rel.h (elf_dynamic_do_rel): Likewise. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: elf/do-rel.h --- elf/do-rel.h 30 Jan 2003 17:36:34 -0000 1.32 +++ elf/do-rel.h 23 Sep 2004 18:32:04 -0000 @@ -1,5 +1,5 @@ /* Do relocations for ELF dynamic linking. - Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or @@ -49,7 +49,7 @@ relocations; they should be set up to call _dl_runtime_resolve, rather than fully resolved now. */ =20 -static inline void __attribute__ ((always_inline)) +auto inline void __attribute__ ((always_inline)) elf_dynamic_do_rel (struct link_map *map, ElfW(Addr) reladdr, ElfW(Addr) relsize, int lazy) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: elf/dynamic-link.h --- elf/dynamic-link.h 6 Mar 2004 09:47:17 -0000 1.50 +++ elf/dynamic-link.h 23 Sep 2004 18:32:04 -0000 @@ -64,8 +64,12 @@ elf_machine_lazy_rel (struct link_map *m =20 =20 /* Read the dynamic section at DYN and fill in INFO with indices DT_*. */ - -static inline void __attribute__ ((unused, always_inline)) +#ifndef RESOLVE +static +#else +auto +#endif +inline void __attribute__ ((unused, always_inline)) elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) { ElfW(Dyn) *dyn =3D l->l_ld; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: locale/weight.h --- locale/weight.h 11 Jun 2003 21:52:12 -0000 1.19 +++ locale/weight.h 23 Sep 2004 18:32:05 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, I= nc. +/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundati= on, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, . =20 @@ -18,7 +18,7 @@ 02111-1307 USA. */ =20 /* Find index of weight. */ -static inline int32_t +inline int32_t __attribute ((always_inline)) findidx (const unsigned char **cpp) { =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: locale/weightwc.h --- locale/weightwc.h 13 Jun 2003 20:44:58 -0000 1.9 +++ locale/weightwc.h 23 Sep 2004 18:32:05 -0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2001,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, . =20 @@ -18,7 +18,7 @@ 02111-1307 USA. */ =20 /* Find index of weight. */ -static inline int32_t +inline int32_t __attribute ((always_inline)) findidx (const wint_t **cpp) { =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: posix/regcomp.c --- posix/regcomp.c 5 Mar 2004 10:43:54 -0000 1.80 +++ posix/regcomp.c 23 Sep 2004 18:32:06 -0000 @@ -2682,7 +2682,7 @@ parse_bracket_exp (regexp, dfa, token, s Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ =20 - static inline int32_t + auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; @@ -2715,7 +2715,7 @@ parse_bracket_exp (regexp, dfa, token, s Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ =20 - static inline unsigned int + auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; @@ -2783,7 +2783,7 @@ parse_bracket_exp (regexp, dfa, token, s mbcset->range_ends, is a pointer argument sinse we may update it. */ =20 - static inline reg_errcode_t + auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; @@ -2866,7 +2866,7 @@ parse_bracket_exp (regexp, dfa, token, s COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ =20 - static inline reg_errcode_t + auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: sysdeps/x86_64/dl-machine.h --- sysdeps/x86_64/dl-machine.h 5 Mar 2004 10:14:47 -0000 1.25 +++ sysdeps/x86_64/dl-machine.h 23 Sep 2004 18:32:06 -0000 @@ -355,7 +386,8 @@ elf_machine_plt_value (struct link_map * /* Perform the relocation specified by RELOC and SYM (which is fully resol= ved). MAP is the object containing the reloc. */ =20 -static inline void +auto inline void +__attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, const Elf64_Sym *sym, const struct r_found_version *version, void *const reloc_addr_arg) @@ -520,7 +552,8 @@ elf_machine_rela (struct link_map *map,=20 } } =20 -static inline void +auto inline void +__attribute ((always_inline)) elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, void *const reloc_addr_arg) { @@ -529,7 +562,8 @@ elf_machine_rela_relative (Elf64_Addr l_ *reloc_addr =3D l_addr + reloc->r_addend; } =20 -static inline void +auto inline void +__attribute ((always_inline)) elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: iconv/iconvconfig.c --- iconv/iconvconfig.c 17 May 2004 18:37:11 -0000 1.19 +++ iconv/iconvconfig.c 23 Sep 2004 18:32:07 -0000 @@ -1011,7 +1011,8 @@ write_output (void) char finalname[prefix_len + sizeof (GCONV_MODULES_CACHE)]; =20 /* Function to insert the names. */ - static void name_insert (const void *nodep, VISIT value, int level) + auto void + name_insert (const void *nodep, VISIT value, int level) { struct name *name; unsigned int idx; --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux AG, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBUxxnOJpWPMJyoSYRAgNvAJsFFeFuVy3S/eIj9WwsNO7MchSX6QCdFHz2 +ep5BbSRjI/NiBw5kvrs5zI= =BBGq -----END PGP SIGNATURE----- --=-=-=--