From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 65F893857C49 for ; Wed, 6 Jul 2022 07:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65F893857C49 Received: by mail-ej1-x630.google.com with SMTP id li14so3713314ejb.2 for ; Wed, 06 Jul 2022 00:59:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=V1VzwbyEcjQ+Po2Ql70KP07cIVlAlbhHpM3/PU7Qeh4=; b=OMfC1SegVRSygbJN+cbHWqlECTGoYlPspCrhsZUzVaN/WU+RUL2cE+mHhT13Z0VPaL SHPzKWSsJACUYf0h8rq2J0SKFPRnEG9WJ7I+0tsJNIsmdJjTE73tfEPZLhEI3FNSd9Nq qzgR3uCCbDRcelyyDjPDZrOgrK/PVH4J0qGlzqpJiHjo1nPMOHsT8+Ri54c9QZNJ738W c6crE5sTdU6EhzUm3DlSSeiDIcvZsghsZDm8/KRoxJCAr9jJR53zPaGA3KB7EdGbxhWX 9YJJhZRMWGHgAL2lsj9FmOVBG4NNoeRixW0QfFJyva3fDApdLDsUg71NhTyZegjEhxAp 0kPg== X-Gm-Message-State: AJIora9A5gYfseKj+TxYcOEzVZIkv3qMvdzPuWBCRG/bvH+srS1MWrUB Gp/wYWmSKHdd9sg/kBH7p+KhsnedvNn98Q== X-Google-Smtp-Source: AGRyM1smI0L5oyBEQInNL5pF8/X5iEDFMpAfy2vq4fd4l+E6tTCTZQ0DUUz23RgPX0V5hQS+VG/QKw== X-Received: by 2002:a17:907:8a25:b0:726:c9f2:2f5e with SMTP id sc37-20020a1709078a2500b00726c9f22f5emr37341831ejc.286.1657094364877; Wed, 06 Jul 2022 00:59:24 -0700 (PDT) Received: from smtpclient.apple (85.65.72.155.dynamic.barak-online.net. [85.65.72.155]) by smtp.gmail.com with ESMTPSA id x2-20020a05640225c200b00435651c4a01sm25484045edb.56.2022.07.06.00.59.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jul 2022 00:59:24 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Yair Lenga Mime-Version: 1.0 (1.0) Subject: Re: Gcc Digest, Vol 29, Issue 7 Date: Wed, 6 Jul 2022 10:59:22 +0300 Message-Id: <194F1262-8AA1-4B0F-93C5-BF3358CD1193@gmail.com> References: <7b581344-5b28-6328-9c1b-310c4d9426c7@westcontrol.com> Cc: gcc@gcc.gnu.org In-Reply-To: <7b581344-5b28-6328-9c1b-310c4d9426c7@westcontrol.com> To: David Brown X-Mailer: iPad Mail (19F77) X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2022 07:59:27 -0000 Thanks for suggestion, definitely doable, more verbose vs the scanf, but wil= l do the trick. I will use it as my fallback, if no path with my current app= roach. Yair. Sent from my iPad > On Jul 6, 2022, at 10:17 AM, David Brown wrote: >=20 > I haven't worked through all the details, but I wonder if this could be tu= rned around a bit. Rather than your function taking a variable number of ar= guments of different types, which as you know can be a risky business, have i= t take an array of (type, void*) pairs (where "type" is an enumeration). Us= e some variadic macro magic to turn the "RESULT_SET_READ" into the creation o= f a local array that is then passed on to the function.