From: "Pedro de Medeiros" <pedrovmm+lists@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Using both wchar_t and GCC __attribute__((format(...)))
Date: Mon, 2 Jul 2007 16:52:05 -0300 [thread overview]
Message-ID: <38511efb0707021252r2b995821x9880f11165500184@mail.gmail.com> (raw)
Hello,
I am trying to convert some functions in my library from (char *) to
(wchar_t *), and it has been a bit of a nightmare. I want to use GCC error
detection for printf-style functions, but that doesn't seem to work when
functions use wchar_t *. For instance:
void trace(conn_t *, wchar_t *, ...)
__attribute__ ((format(printf, 2, 3)));
And GCC aborts with:
"error: format string argument not a string type"
Then I tried something like:
void trace(conn_t *, wchar_t *, ...)
__attribute__ ((format(wprintf, 2, 3)));
But GCC tells me that:
"warning: 'wprintf' is an unrecognized format function type"
Which I assume will disable GCC printf-style error checking.
How do I solve this other than disabling this feature completely?
Any help would be greatly appreciated.
Cheers,
Pedro.
--
Pedro de Medeiros - Ciência da Computação - Universidade de Brasília
Home Page: http://www.nonseq.net - Linux User No.: 234250
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2007-07-02 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 19:52 Pedro de Medeiros [this message]
2007-07-03 4:03 ` Using both wchar_t and GCC __attribute__((format(...))) cyon.john
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=38511efb0707021252r2b995821x9880f11165500184@mail.gmail.com \
--to=pedrovmm+lists@gmail.com \
--cc=linux-c-programming@vger.kernel.org \
/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 NNTP newsgroup(s).