Change the order of function attributes in printf.h
Commit Message
According to ISO C++, exception specification must appear before of the
attribute specifier when declaring functions.
This patch fix issues reported by stdio-common/check-installed-headers-cxx.
2017-03-22 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* stdio-common/printf.h (register_printf_modifier): Change the
order of __wur and __THROW.
(register_printf_type) Likewise.
---
stdio-common/printf.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Zack Weinberg <zackw@panix.com> writes:
> LGTM. Please cite the specific section of the C++ standard that makes this
> requirement in your commit message.
What about this?
According to ISO C++ in subclause 8.3.5 [dcl.fct], exception specification
must appear before the attribute specifier when declaring functions.
P.S.: It looks like your message never reached libc-alpha.
On Thu, Mar 23, 2017 at 1:36 PM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Zack Weinberg <zackw@panix.com> writes:
>> LGTM. Please cite the specific section of the C++ standard that makes this
>> requirement in your commit message.
>
> What about this?
>
> According to ISO C++ in subclause 8.3.5 [dcl.fct], exception specification
> must appear before the attribute specifier when declaring functions.
Sounds good. If you don't mind some English polishing,
# ISO C++ section 8.3.5 [dcl.fct] requires exception specifications
# to appear before attribute specifiers in function declarations.
> P.S.: It looks like your message never reached libc-alpha.
Yes, apparently I can't send plaintext email from my phone :-(
zw
Zack Weinberg <zackw@panix.com> writes:
> [ text/plain ]
> On Thu, Mar 23, 2017 at 1:36 PM, Tulio Magno Quites Machado Filho
> <tuliom@linux.vnet.ibm.com> wrote:
>> Zack Weinberg <zackw@panix.com> writes:
>>> LGTM. Please cite the specific section of the C++ standard that makes this
>>> requirement in your commit message.
>>
>> What about this?
>>
>> According to ISO C++ in subclause 8.3.5 [dcl.fct], exception specification
>> must appear before the attribute specifier when declaring functions.
>
> Sounds good. If you don't mind some English polishing,
>
> # ISO C++ section 8.3.5 [dcl.fct] requires exception specifications
> # to appear before attribute specifiers in function declarations.
Fixed and pushed as ca4dc74659.
Thanks!
@@ -111,13 +111,13 @@ extern int register_printf_function (int __spec, printf_function __func,
it returns a positive value representing the bit set in the USER
field in 'struct printf_info'. */
-extern int register_printf_modifier (const wchar_t *__str) __wur __THROW;
+extern int register_printf_modifier (const wchar_t *__str) __THROW __wur;
/* Register variable argument handler for user type. The return value
is to be used in ARGINFO functions to signal the use of the
type. */
-extern int register_printf_type (printf_va_arg_function __fct) __wur __THROW;
+extern int register_printf_type (printf_va_arg_function __fct) __THROW __wur;
/* Parse FMT, and fill in N elements of ARGTYPES with the