X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fpropername.c;h=8cc83080d2bdd95ee15715d5f8825a52cbf13c52;hb=fa1db0dd22768f09a507674a30beb5b8a87bb35f;hp=f2e80d15a7965d8466383c13fbb06d94f3beda84;hpb=349d7fe0e307d59d508b3579317ee8d4eacfeb9c;p=gnulib.git diff --git a/lib/propername.c b/lib/propername.c index f2e80d15a..8cc83080d 100644 --- a/lib/propername.c +++ b/lib/propername.c @@ -1,5 +1,5 @@ /* Localization of proper names. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2013 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -15,6 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that + the proper_name function might be candidate for attribute 'const' */ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=const" +#endif + #include /* Specification. */ @@ -38,14 +44,6 @@ #include "xalloc.h" #include "gettext.h" -/* The attribute __const__ was added in gcc 2.95. */ -#undef _GL_ATTRIBUTE_CONST -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif - /* Tests whether STRING contains trim (SUB), starting and ending at word boundaries. @@ -156,7 +154,7 @@ mbsstr_trimmed_wordbounded (const char *string, const char *sub) /* Return the localization of NAME. NAME is written in ASCII. */ -const char * _GL_ATTRIBUTE_CONST +const char * proper_name (const char *name) { /* See whether there is a translation. */