diff mbox series

Fix uses of non-reserved names for template parameters

Message ID 20190517141504.GA29695@redhat.com
State New
Headers show
Series Fix uses of non-reserved names for template parameters | expand

Commit Message

Jonathan Wakely May 17, 2019, 2:15 p.m. UTC
* include/bits/random.h (seed_seq::param): Fix non-reserved name.
	* include/experimental/type_traits (is_detected_exact)
	(is_detected_exact_v): Likewise.
	* include/pstl/execution_defs.h (is_execution_policy)
	(is_execution_policy_v, __enable_if_execution_policy): Likewise.
	* include/pstl/execution_impl.h (__policy_traits): Likewise.
	* testsuite/17_intro/names.cc: Check for more non-reserved names.
	* testsuite/experimental/names.cc: New test.

Tested powerpc64le-linux, committed to trunk.

Tom, two pieces of this need to be fixed in upstream PSTL too.
commit 95d3f45c61c52c82d0a0faa3ecd55394a114c5ec
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri May 17 13:17:00 2019 +0100

    Fix uses of non-reserved names for template parameters
    
            * include/bits/random.h (seed_seq::param): Fix non-reserved name.
            * include/experimental/type_traits (is_detected_exact)
            (is_detected_exact_v): Likewise.
            * include/pstl/execution_defs.h (is_execution_policy)
            (is_execution_policy_v, __enable_if_execution_policy): Likewise.
            * include/pstl/execution_impl.h (__policy_traits): Likewise.
            * testsuite/17_intro/names.cc: Check for more non-reserved names.
            * testsuite/experimental/names.cc: New test.

Comments

Rainer Orth May 20, 2019, 12:11 p.m. UTC | #1
Hi Jonathan,

> 	* include/bits/random.h (seed_seq::param): Fix non-reserved name.
> 	* include/experimental/type_traits (is_detected_exact)
> 	(is_detected_exact_v): Likewise.
> 	* include/pstl/execution_defs.h (is_execution_policy)
> 	(is_execution_policy_v, __enable_if_execution_policy): Likewise.
> 	* include/pstl/execution_impl.h (__policy_traits): Likewise.
> 	* testsuite/17_intro/names.cc: Check for more non-reserved names.
> 	* testsuite/experimental/names.cc: New test.
>
> Tested powerpc64le-linux, committed to trunk.

the last testcase FAILs on Solaris:

+FAIL: experimental/names.cc (test for excess errors)

Excess errors:
/usr/include/netdb.h:354: error: expected ')' before ';' token

<netdb.h> has

void freeipsecalgent(struct ipsecalgent *ptr);

I'll raise this with Oracle, not sure what to do with the testcase.

	Rainer
Jonathan Wakely May 20, 2019, 12:20 p.m. UTC | #2
On 20/05/19 14:11 +0200, Rainer Orth wrote:
>Hi Jonathan,
>
>> 	* include/bits/random.h (seed_seq::param): Fix non-reserved name.
>> 	* include/experimental/type_traits (is_detected_exact)
>> 	(is_detected_exact_v): Likewise.
>> 	* include/pstl/execution_defs.h (is_execution_policy)
>> 	(is_execution_policy_v, __enable_if_execution_policy): Likewise.
>> 	* include/pstl/execution_impl.h (__policy_traits): Likewise.
>> 	* testsuite/17_intro/names.cc: Check for more non-reserved names.
>> 	* testsuite/experimental/names.cc: New test.
>>
>> Tested powerpc64le-linux, committed to trunk.
>
>the last testcase FAILs on Solaris:
>
>+FAIL: experimental/names.cc (test for excess errors)
>
>Excess errors:
>/usr/include/netdb.h:354: error: expected ')' before ';' token
>
><netdb.h> has
>
>void freeipsecalgent(struct ipsecalgent *ptr);
>
>I'll raise this with Oracle, not sure what to do with the testcase.

We already have similar workarounds for other targets with unclean
headers, so I suggest we just add:

--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -187,4 +187,8 @@
 #undef y
 #endif

+#ifdef __sun__
+#undef ptr
+#endif
+
 #include <bits/stdc++.h>
Rainer Orth May 20, 2019, 1:40 p.m. UTC | #3
Hi Jonathan,

> On 20/05/19 14:11 +0200, Rainer Orth wrote:
>>Hi Jonathan,
>>
>>> 	* include/bits/random.h (seed_seq::param): Fix non-reserved name.
>>> 	* include/experimental/type_traits (is_detected_exact)
>>> 	(is_detected_exact_v): Likewise.
>>> 	* include/pstl/execution_defs.h (is_execution_policy)
>>> 	(is_execution_policy_v, __enable_if_execution_policy): Likewise.
>>> 	* include/pstl/execution_impl.h (__policy_traits): Likewise.
>>> 	* testsuite/17_intro/names.cc: Check for more non-reserved names.
>>> 	* testsuite/experimental/names.cc: New test.
>>>
>>> Tested powerpc64le-linux, committed to trunk.
>>
>>the last testcase FAILs on Solaris:
>>
>>+FAIL: experimental/names.cc (test for excess errors)
>>
>>Excess errors:
>>/usr/include/netdb.h:354: error: expected ')' before ';' token
>>
>><netdb.h> has
>>
>>void freeipsecalgent(struct ipsecalgent *ptr);
>>
>>I'll raise this with Oracle, not sure what to do with the testcase.
>
> We already have similar workarounds for other targets with unclean
> headers, so I suggest we just add:
>
> --- a/libstdc++-v3/testsuite/17_intro/names.cc
> +++ b/libstdc++-v3/testsuite/17_intro/names.cc
> @@ -187,4 +187,8 @@
> #undef y
> #endif
>
> +#ifdef __sun__
> +#undef ptr
> +#endif
> +
> #include <bits/stdc++.h>

I hadn't noticed, but that worked fine, of course.  Just tested both
names.cc tests on i386-pc-solaris2.11.

Thanks.
        Rainer
Szabolcs Nagy May 20, 2019, 2:11 p.m. UTC | #4
On 17/05/2019 15:15, Jonathan Wakely wrote:
>     * include/bits/random.h (seed_seq::param): Fix non-reserved name.
>     * include/experimental/type_traits (is_detected_exact)
>     (is_detected_exact_v): Likewise.
>     * include/pstl/execution_defs.h (is_execution_policy)
>     (is_execution_policy_v, __enable_if_execution_policy): Likewise.
>     * include/pstl/execution_impl.h (__policy_traits): Likewise.
>     * testsuite/17_intro/names.cc: Check for more non-reserved names.
>     * testsuite/experimental/names.cc: New test.

on baremetal (newlib) targets i see

FAIL: experimental/names.cc (test for excess errors)

because

.../gcc/libstdc++-v3/testsuite/experimental/names.cc:25: fatal error: experimental/filesystem: No such file or directory


> 
> Tested powerpc64le-linux, committed to trunk.
> 
> Tom, two pieces of this need to be fixed in upstream PSTL too.
> 
>
Jonathan Wakely May 20, 2019, 2:38 p.m. UTC | #5
On 20/05/19 14:11 +0000, Szabolcs Nagy wrote:
>On 17/05/2019 15:15, Jonathan Wakely wrote:
>>     * include/bits/random.h (seed_seq::param): Fix non-reserved name.
>>     * include/experimental/type_traits (is_detected_exact)
>>     (is_detected_exact_v): Likewise.
>>     * include/pstl/execution_defs.h (is_execution_policy)
>>     (is_execution_policy_v, __enable_if_execution_policy): Likewise.
>>     * include/pstl/execution_impl.h (__policy_traits): Likewise.
>>     * testsuite/17_intro/names.cc: Check for more non-reserved names.
>>     * testsuite/experimental/names.cc: New test.
>
>on baremetal (newlib) targets i see
>
>FAIL: experimental/names.cc (test for excess errors)
>
>because
>
>.../gcc/libstdc++-v3/testsuite/experimental/names.cc:25: fatal error: experimental/filesystem: No such file or directory

Here's what I've committed ...
Szabolcs Nagy May 20, 2019, 4:05 p.m. UTC | #6
On 20/05/2019 15:38, Jonathan Wakely wrote:
> On 20/05/19 14:11 +0000, Szabolcs Nagy wrote:
>> On 17/05/2019 15:15, Jonathan Wakely wrote:
>>>     * include/bits/random.h (seed_seq::param): Fix non-reserved name.
>>>     * include/experimental/type_traits (is_detected_exact)
>>>     (is_detected_exact_v): Likewise.
>>>     * include/pstl/execution_defs.h (is_execution_policy)
>>>     (is_execution_policy_v, __enable_if_execution_policy): Likewise.
>>>     * include/pstl/execution_impl.h (__policy_traits): Likewise.
>>>     * testsuite/17_intro/names.cc: Check for more non-reserved names.
>>>     * testsuite/experimental/names.cc: New test.
>>
>> on baremetal (newlib) targets i see
>>
>> FAIL: experimental/names.cc (test for excess errors)
>>
>> because
>>
>> .../gcc/libstdc++-v3/testsuite/experimental/names.cc:25: fatal error: experimental/filesystem: No such file or directory
> 
> Here's what I've committed ...

thanks, the fatal error is now fixed.

so now i get a lot of other errors.
is this supposed to work on baremetal?

Excess errors:
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:507: error: 'mutex' in namespace 'std' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:554: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:554: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:554: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:554: error: 'class std::experimental::net::v1::execution_context' has no member
named '_M_mutex'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:578: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:578: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:578: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:578: error: 'class std::experimental::net::v1::execution_context' has no member
named '_M_mutex'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:600: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:600: error: 'mutex' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:600: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:600: error: 'const class std::experimental::net::v1::execution_context' has no
member named '_M_mutex'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:888: error: 'thread' does not name a type; did you mean 'read'?
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:889: error: 'mutex' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:890: error: 'condition_variable' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:866: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:866: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:866: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:868: error: '_M_cv' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:873: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:873: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:873: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:879: error: '_M_thread' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:901: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:901: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:901: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:902: error: '_M_cv' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:916: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:916: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:916: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:919: error: '_M_thread' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:920: error: 'thread' is not a member of 'std'
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:922: error: '_M_cv' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:1489: error: 'thread' in namespace 'std' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/executor:1453: error: 'std::this_thread' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:277: error: 'mutex' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:556: error: 'mutex' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:842: error: 'thread' was not declared in this scope; did you mean 'read'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:842: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:842: error: template argument 2 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:93: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:93: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:93: error: 'class std::experimental::net::v1::io_context' has no member named
'_M_mtx'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:94: error: request for member 'end' in
'((std::experimental::net::v1::io_context*)((const
std::experimental::net::v1::io_context::executor_type*)this)->std::experimental::net::v1::io_context::executor_type::_M_ctx)->std::experimental::net::v1::io_context::_M_call_stack',
which is of non-class type 'int'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:95: error: request for member 'begin' in
'((std::experimental::net::v1::io_context*)((const
std::experimental::net::v1::io_context::executor_type*)this)->std::experimental::net::v1::io_context::executor_type::_M_ctx)->std::experimental::net::v1::io_context::_M_call_stack',
which is of non-class type 'int'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:96: error: 'this_thread' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:118: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:118: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:118: error: 'class std::experimental::net::v1::io_context' has no member named
'_M_mtx'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:220: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:220: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:220: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:227: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:227: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:227: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:273: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:273: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:273: error: 'class std::experimental::net::v1::io_context' has no member named
'_M_mtx'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:299: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:299: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:299: error: '_M_qmtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:308: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:308: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:308: error: '_M_qmtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:330: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:330: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:330: error: '_M_qmtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:349: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:349: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:349: error: '_M_qmtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:370: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:370: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:370: error: '_M_qmtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:477: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:477: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:477: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:496: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:496: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:496: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:564: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:564: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:564: error: 'class std::experimental::net::v1::io_context' has no member named
'_M_mtx'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:565: error: request for member 'push_back' in
'((std::experimental::net::v1::io_context::__monitor*)this)->std::experimental::net::v1::io_context::__monitor::_M_ctx.std::experimental::net::v1::io_context::_M_call_stack',
which is of non-class type 'int'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:565: error: 'this_thread' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:570: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:570: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:570: error: 'class std::experimental::net::v1::io_context' has no member named
'_M_mtx'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:571: error: request for member 'pop_back' in
'((std::experimental::net::v1::io_context::__monitor*)this)->std::experimental::net::v1::io_context::__monitor::_M_ctx.std::experimental::net::v1::io_context::_M_call_stack',
which is of non-class type 'int'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:589: error: '__fdvec' is not a member of
'std::experimental::net::v1::io_context::__reactor'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:616: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:616: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:616: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:664: error: 'struct std::experimental::net::v1::io_context::__reactor' has no
member named 'wait'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:664: error: '__fds' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:666: error: '_S_retry' is not a member of
'std::experimental::net::v1::io_context::__reactor'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:669: error: '_S_timeout' is not a member of
'std::experimental::net::v1::io_context::__reactor'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:680: error: 'mutex' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:680: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:680: error: '_M_mtx' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:701: error: class 'std::experimental::net::v1::io_context::__reactor' does not
have any field named '_M_fds'
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:714: error: '_M_fds' was not declared in this scope; did you mean '_M_ops'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:714: error: 'POLLIN' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:721: error: '_M_fds' was not declared in this scope; did you mean '_M_ops'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:741: error: '_M_fds' was not declared in this scope; did you mean '_M_ops'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:748: error: '_M_lower_bound' was not declared in this scope; did you mean
'__lower_bound'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:751: error: '_M_fds' was not declared in this scope; did you mean '_M_ops'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:751: error: '__fdvec' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:758: error: '_M_lower_bound' was not declared in this scope; did you mean
'__lower_bound'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:760: error: '_M_fds' was not declared in this scope; did you mean '_M_ops'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:768: error: '_M_lower_bound' was not declared in this scope; did you mean
'__lower_bound'?
/aarch64-none-elf/libstdc++-v3/include/experimental/io_context:778: error: '_M_lower_bound' was not declared in this scope; did you mean
'__lower_bound'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:358: error: 'in6addr_any' was not declared in this scope; did you mean 'in_addr_t'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:366: error: 'in6addr_loopback' was not declared in this scope; did you mean
'is_loopback'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:480: error: 'class std::experimental::net::v1::ip::address_v4' has no member named
'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:481: error: 'class std::experimental::net::v1::ip::address_v6' has no member named
'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:640: error: '::inet_pton' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:640: error: 'AF_INET' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:668: error: 'INET_ADDRSTRLEN' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:669: error: '__buf' was not declared in this scope; did you mean '__sbuf'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:708: error: '::inet_pton' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:708: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:904: error: 'const class std::experimental::net::v1::ip::address_v4' has no member
named 'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:910: error: 'const class std::experimental::net::v1::ip::address_v6' has no member
named 'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1203: error: 'class std::experimental::net::v1::ip::address_v4' has no member named
'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1262: error: 'class std::experimental::net::v1::ip::address_v6' has no member named
'to_string'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1498: error: 'sockaddr_in' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1499: error: 'sockaddr_in6' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1429: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1437: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1481: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1482: error: 'sockaddr_in6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1482: error: 'sockaddr_in' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1488: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1488: error: 'sockaddr_in6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1489: error: 'AF_INET' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1489: error: 'sockaddr_in' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1631: error: 'AI_PASSIVE' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1632: error: 'AI_CANONNAME' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1633: error: 'AI_NUMERICHOST' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1637: error: 'AI_V4MAPPED' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1638: error: 'AI_ALL' was not declared in this scope; did you mean 'LC_ALL'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:1639: error: 'AI_ADDRCONFIG' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2076: error: 'AF_INET' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2078: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2083: error: 'SOCK_STREAM' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2084: error: 'IPPROTO_TCP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2116: error: 'AF_INET' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2117: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2122: error: 'SOCK_DGRAM' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2123: error: 'IPPROTO_UDP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2150: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2151: error: 'IPV6_V6ONLY' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2164: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2164: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2164: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2169: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2169: error: 'IPV6_UNICAST_HOPS' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2169: error: 'IP_TTL' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2228: error: 'ipv6_mreq' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2229: error: 'ip_mreq' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2190: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2190: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2190: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2196: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2197: error: 'IPV6_JOIN_GROUP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2197: error: 'IP_ADD_MEMBERSHIP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2213: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2214: error: 'const union
std::experimental::net::v1::ip::multicast::join_group::<unnamed>' has no member named '_M_v6'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2214: error: 'const union
std::experimental::net::v1::ip::multicast::join_group::<unnamed>' has no member named '_M_v4'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2286: error: 'ipv6_mreq' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2287: error: 'ip_mreq' does not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2248: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2248: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2248: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2254: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2255: error: 'IPV6_LEAVE_GROUP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2255: error: 'IP_DROP_MEMBERSHIP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2271: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2272: error: 'const union
std::experimental::net::v1::ip::multicast::leave_group::<unnamed>' has no member named '_M_v6'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2272: error: 'const union
std::experimental::net::v1::ip::multicast::leave_group::<unnamed>' has no member named '_M_v4'
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2329: error: 'in_addr' does not name a type; did you mean 'in_addr_t'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2303: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2303: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2303: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2309: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2310: error: 'IPV6_MULTICAST_IF' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2310: error: 'IP_MULTICAST_IF' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2322: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2323: error: 'const union
std::experimental::net::v1::ip::multicast::outbound_interface::<unnamed>' has no member named '_M_v4'; did you mean '_M_v6'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2341: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2341: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2341: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2347: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2348: error: 'IPV6_MULTICAST_HOPS' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2348: error: 'IP_MULTICAST_TTL' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2360: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2360: error: 'IPPROTO_IPV6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2360: error: 'IPPROTO_IP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2366: error: 'AF_INET6' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2367: error: 'IPV6_MULTICAST_LOOP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2367: error: 'IP_MULTICAST_LOOP' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2381: error: 'resolver_errc' is not a member of 'std::experimental::net::v1::ip';
did you mean 'resolver_base'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2381: error: 'resolver_errc' is not a member of 'std::experimental::net::v1::ip';
did you mean 'resolver_base'?
/aarch64-none-elf/libstdc++-v3/include/experimental/internet:2381: error: template argument 1 is invalid
/aarch64-none-elf/libstdc++-v3/include/experimental/timer:184: error: 'this_thread' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/timer:194: error: 'this_thread' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:363: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:367: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:371: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:375: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:379: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:383: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:387: error: 'message_flags' in 'class std::experimental::net::v1::socket_base' does
not name a type
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:591: error: '::setsockopt' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:605: error: '::getsockopt' has not been declared; did you mean 'getsubopt'?
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:675: error: 'linger' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:846: error: 'shutdown_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:850: error: 'shutdown_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:971: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:975: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:993: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:953: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1117: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1126: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1157: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1216: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1227: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1263: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1318: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1327: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1358: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1416: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1426: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1461: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1105: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1112: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1150: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1164: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1198: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1209: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1255: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1270: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1306: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1313: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1351: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1365: error: 'wait_write' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1399: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1409: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1453: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1468: error: 'wait_write' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1570: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1579: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1614: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1677: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1686: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1721: error: 'std::experimental::net::v1::socket_base::message_flags' has not been
declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1558: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1565: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1607: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1633: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1665: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1672: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1679: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1714: error: 'message_flags' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1740: error: 'wait_write' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2217: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2221: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2238: error: 'wait_type' has not been declared
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2001: error: 'max_listen_connections' was not declared in this scope
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:1844: error: there are no arguments to 'reuse_address' that depend on a template
parameter, so a declaration of 'reuse_address' must be available [-fpermissive]
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2089: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
/aarch64-none-elf/libstdc++-v3/include/experimental/socket:2180: error: 'wait_read' is not a member of 'std::experimental::net::v1::socket_base'
Jonathan Wakely May 20, 2019, 4:10 p.m. UTC | #7
On 20/05/19 16:05 +0000, Szabolcs Nagy wrote:
>On 20/05/2019 15:38, Jonathan Wakely wrote:
>> On 20/05/19 14:11 +0000, Szabolcs Nagy wrote:
>>> On 17/05/2019 15:15, Jonathan Wakely wrote:
>>>>     * include/bits/random.h (seed_seq::param): Fix non-reserved name.
>>>>     * include/experimental/type_traits (is_detected_exact)
>>>>     (is_detected_exact_v): Likewise.
>>>>     * include/pstl/execution_defs.h (is_execution_policy)
>>>>     (is_execution_policy_v, __enable_if_execution_policy): Likewise.
>>>>     * include/pstl/execution_impl.h (__policy_traits): Likewise.
>>>>     * testsuite/17_intro/names.cc: Check for more non-reserved names.
>>>>     * testsuite/experimental/names.cc: New test.
>>>
>>> on baremetal (newlib) targets i see
>>>
>>> FAIL: experimental/names.cc (test for excess errors)
>>>
>>> because
>>>
>>> .../gcc/libstdc++-v3/testsuite/experimental/names.cc:25: fatal error: experimental/filesystem: No such file or directory
>>
>> Here's what I've committed ...
>
>thanks, the fatal error is now fixed.
>
>so now i get a lot of other errors.
>is this supposed to work on baremetal?

It should work just as well as testsuite/experimental/net/headers.cc
does, but that probably fails for bare metal too.

I think for now I should probably remove the Networking TS headers
from that file, or only include them for GNU/Linux.
Jonathan Wakely May 20, 2019, 8:21 p.m. UTC | #8
On 20/05/19 17:10 +0100, Jonathan Wakely wrote:
>On 20/05/19 16:05 +0000, Szabolcs Nagy wrote:
>>On 20/05/2019 15:38, Jonathan Wakely wrote:
>>>On 20/05/19 14:11 +0000, Szabolcs Nagy wrote:
>>>>On 17/05/2019 15:15, Jonathan Wakely wrote:
>>>>>    * include/bits/random.h (seed_seq::param): Fix non-reserved name.
>>>>>    * include/experimental/type_traits (is_detected_exact)
>>>>>    (is_detected_exact_v): Likewise.
>>>>>    * include/pstl/execution_defs.h (is_execution_policy)
>>>>>    (is_execution_policy_v, __enable_if_execution_policy): Likewise.
>>>>>    * include/pstl/execution_impl.h (__policy_traits): Likewise.
>>>>>    * testsuite/17_intro/names.cc: Check for more non-reserved names.
>>>>>    * testsuite/experimental/names.cc: New test.
>>>>
>>>>on baremetal (newlib) targets i see
>>>>
>>>>FAIL: experimental/names.cc (test for excess errors)
>>>>
>>>>because
>>>>
>>>>.../gcc/libstdc++-v3/testsuite/experimental/names.cc:25: fatal error: experimental/filesystem: No such file or directory
>>>
>>>Here's what I've committed ...
>>
>>thanks, the fatal error is now fixed.
>>
>>so now i get a lot of other errors.
>>is this supposed to work on baremetal?
>
>It should work just as well as testsuite/experimental/net/headers.cc
>does, but that probably fails for bare metal too.
>
>I think for now I should probably remove the Networking TS headers
>from that file, or only include them for GNU/Linux.

This should fix it. Committed to trunk.
diff mbox series

Patch

diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 3f5ae53086e..2b1df4cb59e 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -6080,9 +6080,9 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     size_t size() const noexcept
     { return _M_v.size(); }
 
-    template<typename OutputIterator>
+    template<typename _OutputIterator>
       void
-      param(OutputIterator __dest) const
+      param(_OutputIterator __dest) const
       { std::copy(_M_v.begin(), _M_v.end(), __dest); }
 
     // no copy functions
diff --git a/libstdc++-v3/include/experimental/type_traits b/libstdc++-v3/include/experimental/type_traits
index c2b2dcc2739..2403bd24223 100644
--- a/libstdc++-v3/include/experimental/type_traits
+++ b/libstdc++-v3/include/experimental/type_traits
@@ -252,12 +252,12 @@  template<typename _Default, template<typename...> class _Op, typename... _Args>
 template<typename _Default, template<typename...> class _Op, typename... _Args>
   using detected_or_t = typename detected_or<_Default, _Op, _Args...>::type;
 
-template<typename Expected, template<typename...> class _Op, typename... _Args>
-  using is_detected_exact = is_same<Expected, detected_t<_Op, _Args...>>;
+template<typename _Expected, template<typename...> class _Op, typename... _Args>
+  using is_detected_exact = is_same<_Expected, detected_t<_Op, _Args...>>;
 
-template<typename Expected, template<typename...> class _Op, typename... _Args>
+template<typename _Expected, template<typename...> class _Op, typename... _Args>
   constexpr bool is_detected_exact_v
-    = is_detected_exact<Expected, _Op, _Args...>::value;
+    = is_detected_exact<_Expected, _Op, _Args...>::value;
 
 template<typename _To, template<typename...> class _Op, typename... _Args>
   using is_detected_convertible
diff --git a/libstdc++-v3/include/pstl/execution_defs.h b/libstdc++-v3/include/pstl/execution_defs.h
index 9a4b49bd46a..1a551c7871c 100644
--- a/libstdc++-v3/include/pstl/execution_defs.h
+++ b/libstdc++-v3/include/pstl/execution_defs.h
@@ -117,7 +117,7 @@  constexpr parallel_unsequenced_policy par_unseq{};
 constexpr unsequenced_policy unseq{};
 
 // 2.3, Execution policy type trait
-template <class T>
+template <class _Tp>
 struct is_execution_policy : std::false_type
 {
 };
@@ -142,8 +142,8 @@  struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_ty
 };
 
 #if __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
-template <class T>
-constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<T>::value;
+template <class _Tp>
+constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_Tp>::value;
 #endif
 
 } // namespace v1
@@ -151,10 +151,10 @@  constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<T>
 
 namespace __internal
 {
-template <class ExecPolicy, class T>
+template <class _ExecPolicy, class _Tp>
 using __enable_if_execution_policy =
-    typename std::enable_if<__pstl::execution::is_execution_policy<typename std::decay<ExecPolicy>::type>::value,
-                            T>::type;
+    typename std::enable_if<__pstl::execution::is_execution_policy<typename std::decay<_ExecPolicy>::type>::value,
+                            _Tp>::type;
 } // namespace __internal
 
 } // namespace __pstl
diff --git a/libstdc++-v3/include/pstl/execution_impl.h b/libstdc++-v3/include/pstl/execution_impl.h
index 8ee5fa062a8..cbebbbd4239 100644
--- a/libstdc++-v3/include/pstl/execution_impl.h
+++ b/libstdc++-v3/include/pstl/execution_impl.h
@@ -66,7 +66,7 @@  struct __is_random_access_iterator<_IteratorType>
 };
 
 /* policy */
-template <typename Policy>
+template <typename _Policy>
 struct __policy_traits
 {
 };
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index c3c753b35e5..20123a41287 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -19,7 +19,6 @@ 
 
 // Define macros for some common variables names that we must not use for
 // naming variables, parameters etc. in the library.
-#define tmp (
 #define A (
 #define B (
 #define C (
@@ -99,6 +98,78 @@ 
 #define y (
 #define z (
 
+#define tmp (
+
+#if __cplusplus < 201703L
+// <charconv> defines to_chars_result::ptr and to_chars_result::ec
+#define ec (
+#define ptr (
+#endif
+
+// Common template parameter names
+#define OutputIterator		OutputIterator is not a reserved name
+#define InputIterator		InputIterator is not a reserved name
+#define ForwardIterator		ForwardIterator is not a reserved name
+#define BidirectionalIterator	BidirectionalIterator is not a reserved name
+#define RandomAccessIterator	RandomAccessIterator is not a reserved name
+#define RandomAccessOutputIterator	RandomAccessOutputIterator is not a reserved name
+#define RAIter			RAIter is not a reserved name
+#define FwdIter			FwdIter is not a reserved name
+#define OutIter			OutIter is not a reserved name
+#define InIter			InIter is not a reserved name
+
+#define Alloc			Alloc is not a reserved name
+#define BinaryFunction1		BinaryFunction1 is not a reserved name
+#define BinaryFunction2		BinaryFunction2 is not a reserved name
+#define Char			Char is not a reserved name
+#define CharT			CharT is not a reserved name
+#define Cmp			Cmp is not a reserved name
+#define Compare			Compare is not a reserved name
+#define Const_Iterator		Const_Iterator is not a reserved name
+#define Const_Key_Reference	Const_Key_Reference is not a reserved name
+#define Const_Node_Iter		Const_Node_Iter is not a reserved name
+#define Const_Pointer		Const_Pointer is not a reserved name
+#define Const_Reference		Const_Reference is not a reserved name
+#define Data			Data is not a reserved name
+#define DiffType		DiffType is not a reserved name
+#define Eq			Eq is not a reserved name
+#define ExecPolicy		ExecPolicy is not a reserved name
+#define Expected		Expected is not a reserved name
+#define External_Load_Access	External_Load_Access is not a reserved name
+#define External_Size_Access	External_Size_Access is not a reserved name
+#define Fn			Fn is not a reserved name
+#define Function		Function is not a reserved name
+#define Functor			Functor is not a reserved name
+#define Hash			Hash is not a reserved name
+#define H1			H1 is not a reserved name
+#define H2			H2 is not a reserved name
+#define Head			Head is not a reserved name
+#define It			It is not a reserved name
+#define Iter			Iter is not a reserved name
+#define Iterator		Iterator is not a reserved name
+#define Key			Key is not a reserved name
+#define Mapped			Mapped is not a reserved name
+#define Node			Node is not a reserved name
+#define Node_iter		Node_iter is not a reserved name
+#define Node_ptr		Node_ptr is not a reserved name
+#define Overflow		Overflow is not a reserved name
+#define Pointer			Pointer is not a reserved name
+#define Policy			Policy is not a reserved name
+#define Pred			Pred is not a reserved name
+#define Ptr			Ptr is not a reserved name
+#define Reference		Reference is not a reserved name
+#define Seq			Seq is not a reserved name
+#define Seq_RAIter		Seq_RAIter is not a reserved name
+#define Series			Series is not a reserved name
+#define Set			Set is not a reserved name
+#define String			String is not a reserved name
+#define Tp			Tp is not a reserved name
+#define Traits			Traits is not a reserved name
+#define Type			Type is not a reserved name
+#define Value			Value is not a reserved name
+#define ValueT			ValueT is not a reserved name
+#define ValueType		ValueType is not a reserved name
+
 #ifdef _AIX
 // See https://gcc.gnu.org/ml/libstdc++/2017-03/msg00015.html
 #undef f
diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc
new file mode 100644
index 00000000000..e97baf3d5bd
--- /dev/null
+++ b/libstdc++-v3/testsuite/experimental/names.cc
@@ -0,0 +1,64 @@ 
+// Copyright (C) 2017-2019 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-do compile }
+
+// Define macros for some common variables names that we must not use for
+// naming variables, parameters etc. in the library.
+
+#include "../17_intro/names.cc"
+// Filesystem
+#include <experimental/filesystem>
+// Library Fundamentals
+#include <experimental/algorithm>
+#include <experimental/any>
+#include <experimental/array>
+#include <experimental/chrono>
+#include <experimental/deque>
+#include <experimental/forward_list>
+#include <experimental/functional>
+#include <experimental/iterator>
+#include <experimental/list>
+#include <experimental/map>
+#include <experimental/memory>
+#include <experimental/memory_resource>
+#include <experimental/numeric>
+#include <experimental/optional>
+#include <experimental/propagate_const>
+#include <experimental/random>
+#include <experimental/ratio>
+#include <experimental/regex>
+#include <experimental/set>
+#include <experimental/source_location>
+#include <experimental/string>
+#include <experimental/string_view>
+#include <experimental/system_error>
+#include <experimental/tuple>
+#include <experimental/type_traits>
+#include <experimental/unordered_map>
+#include <experimental/unordered_set>
+#include <experimental/utility>
+#include <experimental/vector>
+// Networking
+#include <experimental/buffer>
+#include <experimental/internet>
+#include <experimental/io_context>
+#include <experimental/net>
+#include <experimental/netfwd>
+#include <experimental/socket>
+#include <experimental/timer>
+#include <experimental/executor>