From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 286E53830080 for ; Fri, 20 May 2022 17:51:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 286E53830080 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-e656032735so11193324fac.0 for ; Fri, 20 May 2022 10:51:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=CBpLXUX/oqObHsR1z4VikRknq3Z7WzpVsj0VnaaT2Hs=; b=tYYshpYbSK7vSNvE2DSDQOmtPjEDvNKxNr3HF3mxa2Au9e2f8k6VIFBDGiq7pXYqZw mrZB/UoinNZ7IJfMSDh9fCMRCI4cXKJFeBkN3zRZwFWmwYmmpo5dnXXbFRaJbN6H9qoi GDustHAqRhNiRhPIjtEe2RaVhIZvME5ZtpYOsAAbpi2jLmR+o/BqhSBLWmuTvd+6VgCJ xmHmsWFa+2X7amvT6j9xQTj3rr9N4iR3a1ezgWVb6XYia5/A8sFWphLwiQ33tpPDL3AW J5V6Nl4udfRcoTDWzIKMj6AEI5ySduzPSHKcdhpRGdovhzO5u05tEtwcO2ZnSayN43Au ZXOA== X-Gm-Message-State: AOAM530iQUaFzJtsZn/k4GX5pyK7AELYvZ5SN8K06kTXrMAY/dWGwAsQ FXpB56rm4L1ub4gQHIOcKuGFxA== X-Google-Smtp-Source: ABdhPJx33U8iJZiGxKaO4DHdXi6iqZ/aUWoenWU8R5LsUbOcgWzUqhCLIziVVmIuWQZlcde+tVLNFQ== X-Received: by 2002:a05:6870:9724:b0:f1:b413:8aa8 with SMTP id n36-20020a056870972400b000f1b4138aa8mr6531984oaq.39.1653069079246; Fri, 20 May 2022 10:51:19 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:cdd6:2f68:19ef:b907:1f26? ([2804:431:c7cb:cdd6:2f68:19ef:b907:1f26]) by smtp.gmail.com with ESMTPSA id d15-20020a4a9ccf000000b0035eb4e5a6c5sm1349238ook.27.2022.05.20.10.51.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 10:51:18 -0700 (PDT) Message-ID: Date: Fri, 20 May 2022 14:51:16 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 10/26] stdio-common: Move union printf_arg int Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <65221473c57c0d0def4d698b81e95f4492a832c1.1647544751.git.fweimer@redhat.com> From: Adhemerval Zanella In-Reply-To: <65221473c57c0d0def4d698b81e95f4492a832c1.1647544751.git.fweimer@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2022 17:51:21 -0000 On 17/03/2022 16:30, Florian Weimer via Libc-alpha wrote: > The type does not depend on wide vs narrow preprocessor macros, > so it does not need to be customized in stdio-common/printf-parse.h. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > include/printf.h | 21 +++++++++++++++++++++ > stdio-common/printf-parse.h | 23 ----------------------- > 2 files changed, 21 insertions(+), 23 deletions(-) > > diff --git a/include/printf.h b/include/printf.h > index e1ac20807b..770c32d8f8 100644 > --- a/include/printf.h > +++ b/include/printf.h > @@ -18,6 +18,27 @@ int __register_printf_specifier (int, printf_function, > printf_arginfo_size_function); > libc_hidden_proto (__register_printf_specifier) > > +/* The various kinds of arguments that can be passed to printf. */ > +union printf_arg > + { > + wchar_t pa_wchar; > + int pa_int; > + long int pa_long_int; > + long long int pa_long_long_int; > + unsigned int pa_u_int; > + unsigned long int pa_u_long_int; > + unsigned long long int pa_u_long_long_int; > + double pa_double; > + long double pa_long_double; > +#if __HAVE_FLOAT128_UNLIKE_LDBL > + _Float128 pa_float128; > +#endif > + const char *pa_string; > + const wchar_t *pa_wstring; > + void *pa_pointer; > + void *pa_user; > +}; > + > #include > > /* Now define the internal interfaces. */ > diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h > index de0f289c1f..d00c165131 100644 > --- a/stdio-common/printf-parse.h > +++ b/stdio-common/printf-parse.h > @@ -44,29 +44,6 @@ struct printf_spec > int size; > }; > > - > -/* The various kinds off arguments that can be passed to printf. */ > -union printf_arg > - { > - wchar_t pa_wchar; > - int pa_int; > - long int pa_long_int; > - long long int pa_long_long_int; > - unsigned int pa_u_int; > - unsigned long int pa_u_long_int; > - unsigned long long int pa_u_long_long_int; > - double pa_double; > - long double pa_long_double; > -#if __HAVE_FLOAT128_UNLIKE_LDBL > - _Float128 pa_float128; > -#endif > - const char *pa_string; > - const wchar_t *pa_wstring; > - void *pa_pointer; > - void *pa_user; > - }; > - > - > #ifndef DONT_NEED_READ_INT > /* Read a simple integer from a string and update the string pointer. > It is assumed that the first character is a digit. */