This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/60022] macro _(Text) generates warning: implicit declaration of function '_' [-Wimplicit-function-declaration]
- From: "richard at netbsd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Feb 2014 10:52:29 +0000
- Subject: [Bug preprocessor/60022] macro _(Text) generates warning: implicit declaration of function '_' [-Wimplicit-function-declaration]
- Auto-submitted: auto-generated
- References: <bug-60022-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60022
--- Comment #4 from Richard PALO <richard at netbsd dot org> ---
(In reply to Jakub Jelinek from comment #2)
> You can preprocess with -E -dD and look at what exactly was defined where
> and how the preprocessed line containing call to rpmlog looks like.
Here are the relevant parts:
======================================================================
# 1 "/usr/include/libintl.h" 1 3 4
# 28 "/usr/include/libintl.h" 3 4
#define _LIBINTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
# 53 "/usr/include/libintl.h" 3 4
#define _WCHAR_T
typedef int wchar_t;
#define TEXTDOMAINMAX 256
#define __GNU_GETTEXT_SUPPORTED_REVISION(m) ((((m) == 0) || ((m) == 1)) ? 1 :
-1)
extern char *dcgettext(const char *, const char *, const int);
extern char *dgettext(const char *, const char *);
extern char *gettext(const char *);
extern char *textdomain(const char *);
extern char *bindtextdomain(const char *, const char *);
========================================================
and
=========================================================
# 37 "/usr/include/locale.h" 2 3 4
# 53 "/usr/include/locale.h" 3 4
#define _LastCategory LC_MESSAGES
#define _ValidCategory(c) (((int)(c) >= LC_CTYPE) && ((int)(c) <=
_LastCategory) || ((int)c == LC_ALL))
# 132 "../system.h" 2
#define _(Text) dgettext (PACKAGE, Text)
#define N_(Text) Text
=========================================================
an extract from rpmfileio.c using the macro:
if (tfd == NULL || Ferror(tfd)) {
rpmlog(RPMLOG_ERR, _("error creating temporary file %s: %m\n"), tempfn);
goto exit;