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 make it work with GCC 3.5 (see http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02641.html). There are some 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. ============================================================ 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. */ - 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. */ - 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. */ - 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. */ - 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; ============================================================ 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, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, . @@ -18,7 +18,7 @@ 02111-1307 USA. */ /* Find index of weight. */ -static inline int32_t +inline int32_t __attribute ((always_inline)) findidx (const unsigned char **cpp) { ============================================================ 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, . @@ -18,7 +18,7 @@ 02111-1307 USA. */ /* Find index of weight. */ -static inline int32_t +inline int32_t __attribute ((always_inline)) findidx (const wint_t **cpp) { -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126