From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13862 invoked by alias); 31 Aug 2004 13:24:54 -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 13844 invoked from network); 31 Aug 2004 13:24:52 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 31 Aug 2004 13:24:52 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i7VB713j020481; Tue, 31 Aug 2004 13:07:01 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i7VB71f4020479; Tue, 31 Aug 2004 13:07:01 +0200 Date: Tue, 31 Aug 2004 13:24:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix attribute_hidden location Message-ID: <20040831110701.GI30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-08/txt/msg00086.txt.bz2 Hi! GCC recently started allowing visibility attributes not only for decls, but also for types. The side-effect of this is that with type *attribute_hidden foo (void) attribute_hidden no longer applies to foo, but to type * (and results in a warning). See http://gcc.gnu.org/PR17251 for details. If attribute_hidden is moved before the type, it will work right with both old and new GCC, so even if GCC is changed to restore the old behaviour somehow, IMHO following patch certainly doesn't hurt. 2004-08-31 Jakub Jelinek * wcsmbs/wcsmbsload.c (__wcsmbs_getfct): Move attribute_hidden before return type. * locale/localename.c (__current_locale_name): Likewise. --- libc/wcsmbs/wcsmbsload.c.jj 2004-04-13 10:42:56.000000000 +0200 +++ libc/wcsmbs/wcsmbsload.c 2004-08-31 15:02:12.678731411 +0200 @@ -78,8 +78,8 @@ const struct gconv_fcts __wcsmbs_gconv_f }; -struct __gconv_step * attribute_hidden +struct __gconv_step * __wcsmbs_getfct (const char *to, const char *from, size_t *nstepsp) { size_t nsteps; --- libc/locale/localename.c.jj 2002-08-30 12:36:18.000000000 +0200 +++ libc/locale/localename.c 2004-08-31 15:01:43.144992759 +0200 @@ -1,5 +1,5 @@ /* current locale setting names - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ #include "localeinfo.h" -const char * attribute_hidden +const char * __current_locale_name (int category) { return _NL_CURRENT_LOCALE->__names[category]; Jakub