public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Yair Lenga <yair.lenga@gmail.com>
To: David Brown <david@westcontrol.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Gcc Digest, Vol 29, Issue 7
Date: Wed, 6 Jul 2022 10:59:22 +0300	[thread overview]
Message-ID: <194F1262-8AA1-4B0F-93C5-BF3358CD1193@gmail.com> (raw)
In-Reply-To: <7b581344-5b28-6328-9c1b-310c4d9426c7@westcontrol.com>

Thanks for suggestion, definitely doable, more verbose vs the scanf, but will do the trick. I will use it as my fallback, if no path with my current approach. Yair. Sent from my iPad

> On Jul 6, 2022, at 10:17 AM, David Brown <david@westcontrol.com> wrote:
> 
> I haven't worked through all the details, but I wonder if this could be turned around a bit.  Rather than your function taking a variable number of arguments of different types, which as you know can be a risky business, have it take an array of (type, void*) pairs (where "type" is an enumeration).  Use some variadic macro magic to turn the "RESULT_SET_READ" into the creation of a local array that is then passed on to the function.

      reply	other threads:[~2022-07-06  7:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.0.1656936003.1843426.gcc@gcc.gnu.org>
2022-07-05  7:19 ` Yair Lenga
2022-07-05 12:16   ` Florian Weimer
2022-07-05 21:24     ` Yair Lenga
2022-07-07 10:02       ` Safer vararg calls Florian Weimer
2022-07-05 21:52   ` Gcc Digest, Vol 29, Issue 7 Andrew Pinski
2022-07-06  7:17   ` David Brown
2022-07-06  7:59     ` Yair Lenga [this message]

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=194F1262-8AA1-4B0F-93C5-BF3358CD1193@gmail.com \
    --to=yair.lenga@gmail.com \
    --cc=david@westcontrol.com \
    --cc=gcc@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).