From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8086 invoked by alias); 15 Feb 2005 19:55:18 -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 8067 invoked from network); 15 Feb 2005 19:55:18 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 15 Feb 2005 19:55:18 -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 6870C14883ED; Tue, 15 Feb 2005 20:55:17 +0100 (CET) Received: from aj by arthur.inka.de with local (Exim 4.42) id 1D18mx-0006xj-9Z; Tue, 15 Feb 2005 20:55:15 +0100 From: Andreas Jaeger To: Alexandre Oliva Cc: libc-hacker@sources.redhat.com Subject: Re: getting glibc to compile with GCC CVS mainline References: Date: Tue, 15 Feb 2005 19:55:00 -0000 In-Reply-To: (Alexandre Oliva's message of "07 Feb 2005 06:37:25 -0200") Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4.15 (linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2005-02/txt/msg00050.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 5220 Alexandre Oliva writes: > Here are patches to fix incompatibilities with the current CVS version > of GCC. > > The first addresses a problem that causes GCC to reject auto nested > functions that are declared but not defined. The actual error message is: dl-reloc.c: In function =E2=80=98_dl_relocate_object=E2=80=99: dynamic-link.h:44: error: nested function =E2=80=98elf_machine_rel_relative= =E2=80=99 declared but never defined dynamic-link.h:37: error: nested function =E2=80=98elf_machine_rel=E2=80=99= declared but never defined > The second addresses a problem of trying to construct array types of > incomplete types. Although this is well-formed C++, it's ill-formed > C, even if the type would decay to pointer to incomplete type, which > is well-formed in both languages. There were two occurrences of this > error in glibc. Shall I commit these patches? Andreas > > Index: ChangeLog > 2005-02-03 Alexandre Oliva > > * elf/dynamic-link.h: Don't declare nested auto functions that are > not going to be defined. > > --- elf/dynamic-link.h 2005-01-22 16:18:28.000000000 -0200 > +++ elf/dynamic-link.h 2005-02-07 06:20:18.000000000 -0200 > @@ -1,5 +1,5 @@ > /* Inline functions for dynamic linking. > - Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. > + Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, I= nc. > This file is part of the GNU C Library. >=20=20 > The GNU C Library is free software; you can redistribute it and/or > @@ -31,20 +31,24 @@ > optimizing away alignment tests or using word instructions for > copying memory, breaking the very code written to handle the > unaligned cases. */ > +# if ! ELF_MACHINE_NO_REL > auto void __attribute__((always_inline)) > elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, > const ElfW(Sym) *sym, const struct r_found_version *version, > void *const reloc_addr); > auto void __attribute__((always_inline)) > +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, > + void *const reloc_addr); > +# endif > +# if ! ELF_MACHINE_NO_RELA > +auto void __attribute__((always_inline)) > elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, > const ElfW(Sym) *sym, const struct r_found_version *version, > void *const reloc_addr); > auto void __attribute__((always_inline)) > -elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, > - void *const reloc_addr); > -auto void __attribute__((always_inline)) > elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, > void *const reloc_addr); > +# endif > # if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL > auto void __attribute__((always_inline)) > elf_machine_lazy_rel (struct link_map *map, > > Index: ChangeLog > 2005-02-02 Alexandre Oliva > > * iconvdata/jis0208.h (struct jisx0208_ucs_idx): Move declaration > before use. Fix typo in comment. > > Index: nptl/ChangeLog > 2005-02-02 Alexandre Oliva > > * sysdeps/pthread/pthread.h (__sigsetjmp): Don't declare __env > argument as array, GCC 4 doesn't like it. > > Index: iconvdata/jis0208.h > --- iconvdata/jis0208.h 2003-06-11 18:40:42.000000000 -0300 > +++ iconvdata/jis0208.h 2005-02-02 05:57:39.000000000 -0200 > @@ -27,13 +27,7 @@ > /* Conversion table. */ > extern const uint16_t __jis0208_to_ucs[]; >=20=20 > -extern const char __jisx0208_from_ucs4_lat1[256][2]; > -extern const char __jisx0208_from_ucs4_greek[0xc1][2]; > -extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[]; > -extern const char __jisx0208_from_ucs_tab[][2]; > - > - > -/* Struct for table with indeces in UCS mapping table. */ > +/* Struct for table with indexes in UCS mapping table. */ > struct jisx0208_ucs_idx > { > uint16_t start; > @@ -41,6 +35,11 @@ > uint16_t idx; > }; >=20=20 > +extern const char __jisx0208_from_ucs4_lat1[256][2]; > +extern const char __jisx0208_from_ucs4_greek[0xc1][2]; > +extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[]; > +extern const char __jisx0208_from_ucs_tab[][2]; > + >=20=20 > static inline uint32_t > __attribute ((always_inline)) > Index: nptl/sysdeps/pthread/pthread.h > --- nptl/sysdeps/pthread/pthread.h 2004-12-05 00:18:43.000000000 -0200 > +++ nptl/sysdeps/pthread/pthread.h 2005-02-02 08:21:16.000000000 -0200 > @@ -1,4 +1,4 @@ > -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. > +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. > This file is part of the GNU C Library. >=20=20 > The GNU C Library is free software; you can redistribute it and/or > @@ -661,7 +661,7 @@ >=20=20 > /* Function used in the macros. */ > struct __jmp_buf_tag; > -extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) _= _THROW; > +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __T= HROW; >=20=20 >=20=20 > /* Mutex handling. */ Andreas --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SUSE Linux Products GmbH, 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.5 (GNU/Linux) iD8DBQBCElOjOJpWPMJyoSYRAq2AAKCA76GrWCgcwL4hwczGolsIw5xs1QCglW/8 pihYNfvnLRhZA8DzSSMbhKo= =jEFF -----END PGP SIGNATURE----- --=-=-=--