From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1903 invoked by alias); 6 Sep 2004 18:52:53 -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 1882 invoked from network); 6 Sep 2004 18:52:52 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 6 Sep 2004 18:52:52 -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 9D27CB9090E for ; Mon, 6 Sep 2004 20:51:51 +0200 (CEST) Received: from aj by arthur.inka.de with local (Exim 4.30) id 1C4Oai-0004cr-DH for libc-hacker@sources.redhat.com; Mon, 06 Sep 2004 20:51:48 +0200 From: Andreas Jaeger Organization: SUSE Linux AG To: libc-hacker@sources.redhat.com Subject: Fix locale/weight.h with GCC 3.5 Date: Mon, 06 Sep 2004 18:52:00 -0000 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5869080.4pLAMoKjco"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200409062051.48190.aj@suse.de> X-SW-Source: 2004-09/txt/msg00015.txt.bz2 --nextPart5869080.4pLAMoKjco Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 4438 Compiling glibc with GCC 3.5 I got the following failure: In file included from strcoll_l.c:87: ../locale/weight.h: In function `__strcoll_l': ../locale/weight.h:24: error: invalid storage class for function `findidx' make[2]: *** [/builds/glibc/3.5/string/strcoll_l.o] Error 1 make[2]: Leaving directory `/cvs/libc/string' Since we include weight.h in block scope, we have to remove the static to m= ake=20 it work with GCC 3.5 (see=20 http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02641.html). There are some=20 more places that fail similiar. Ok to commit the appended patch? There're some more places like this - expect a followup-email tomorrow, Andreas 2004-09-06 Andreas Jaeger * 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. =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 6 Sep 2004 18:51:04 -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 + 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 + 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 + 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 + 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: locale/weight.h --- locale/weight.h 11 Jun 2003 21:52:12 -0000 1.19 +++ locale/weight.h 6 Sep 2004 18:51:04 -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,=20 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 6 Sep 2004 18:51:04 -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) { --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux AG, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --nextPart5869080.4pLAMoKjco Content-Type: application/pgp-signature Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBPLHEOJpWPMJyoSYRAhidAJ4lKfmZ1Ixbno6cZ2ru6Mj6DINGmgCfb1+X COcVid/9re/vsNqoWHXGwfQ= =uihN -----END PGP SIGNATURE----- --nextPart5869080.4pLAMoKjco--