c++: modules and explicit(bool) [PR103752]
authorJason Merrill <jason@redhat.com>
Wed, 9 Feb 2022 05:31:12 +0000 (00:31 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 9 Feb 2022 15:41:06 +0000 (10:41 -0500)
commit1ce5395977f37e8d0c03394f7b932a584ce85cc7
tree37282422b58c25f4a086d75462cdc94e8955edd1
parent8f8f8c68b434eb32756284dd8e80cfbdff524a20
c++: modules and explicit(bool) [PR103752]

We weren't streaming a C++20 dependent explicit-specifier.

PR c++/103752

gcc/cp/ChangeLog:

* module.cc (trees_out::core_vals): Stream explicit specifier.
(trees_in::core_vals): Likewise.
* pt.cc (store_explicit_specifier): No longer static.
(tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
* cp-tree.h (lookup_explicit_specifier): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/modules/explicit-bool-1_b.C: New test.
* g++.dg/modules/explicit-bool-1_a.H: New test.
gcc/cp/cp-tree.h
gcc/cp/module.cc
gcc/cp/pt.cc
gcc/testsuite/g++.dg/modules/explicit-bool-1_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/explicit-bool-1_b.C [new file with mode: 0644]