From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix attribute_hidden location
Date: Tue, 31 Aug 2004 13:24:00 -0000 [thread overview]
Message-ID: <20040831110701.GI30497@sunsite.ms.mff.cuni.cz> (raw)
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 <jakub@redhat.com>
* 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
next reply other threads:[~2004-08-31 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 13:24 Jakub Jelinek [this message]
2004-09-01 0:50 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040831110701.GI30497@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).