public inbox for
 help / color / mirror / Atom feed
From: Lee Shallis <>
To: GCC Help <>
Subject: Declaring a function to be of wprintf style
Date: Thu, 22 Sep 2022 17:24:32 +0100	[thread overview]
Message-ID: <> (raw)

I attempted this:

#ifdef __GNUC__
    __attribute__((format (printf, ARGS_POS, VA_POS)))
    __attribute__((format (wprintf, ARGS_POS, VA_POS)))

#ifdef _DEBUG

But gcc gave this "error: ‘wprintf’ is an unrecognized format function
type", I also tried just printf but then it complained the args
parameter was not of char const *

Is there anyway to declare it to be of that style and if so is there a
way to extend what it checks for as I have some custom modifiers for
the string types & and some extra specifiers, 3 of which can change
what is expected to be found in the args, namely what options are
sought out, what modifiers are sought out and what specifiers are
sought out, I would greatly appreciate being able to get my arguments
checked for type mis-matches in the default scenarios during compile

                 reply	other threads:[~2022-09-22 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).