This patch optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc
This patch optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_const.
* g++.dg/ext/is_const.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 4
): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 18 ++
1 file changed, 18 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index bd57488824b..674d398c075 100644
--- a/libstdc++-v3/include/std
.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__is_member_object_pointer.
* g++.dg/ext/is_member_object_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3
/valarray_array.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 ++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 4 +++
gcc/testsuite/g++.dg/ext/has-builtin-1.C| 3 ++
gcc/testsuite/g++.dg/ext/is_scalar.C
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
On Thu, Sep 14, 2023 at 10:54 AM Joseph Myers wrote:
>
> On Wed, 13 Sep 2023, Ken Matsui via Gcc-patches wrote:
>
> > diff --git a/gcc/c/c-parser.h b/gcc/c/c-parser.h
> > index 545f0f4d9eb..eed6deaf0f8 100644
> > --- a/gcc/c/c-parser.h
> > +++ b/gcc/c/c-pars
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_volatile.
* g++.dg/ext/is_volatile.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
discussion:
https://gcc.gnu.org/pipermail/gcc/2023-September/242460.html
Code provided by Andrew:
https://gcc.gnu.org/pipermail/gcc/2023-September/242461.html
Co-authored-by: Andrew Pinski
Signed-off-by: Ken Matsui
---
gcc/c-family/c-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion
.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_scoped_enum.
* g++.dg/ext/is_scoped_enum.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +
gcc/cp/cp-trait.def | 1 +
gcc/cp
This patch optimizes the performance of the is_volatile trait by dispatching
to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile built-in
trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken Matsui
information about the benchmark results, please
refer to the following link.
https://github.com/ken-matsui/gsoc23/blob/main/reports/gcc-build
gcc/c-family/ChangeLog:
* c-indentation.h (struct token_indent_info): Make keyword 16 bits.
gcc/c/ChangeLog:
* c-parser.cc (c_parse_init): Handle
This patch optimizes the performance of the is_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unbounded_array.
* g++.dg/ext/is_unbounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 36ad9814047..bd57488824b 100644
--- a/libstdc++-v3/include
): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 18 ++
1 file changed, 18 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index bd57488824b..674d398c075 100644
--- a/libstdc++-v3/include/std
): Rename to ...
(__is_signed_type): ... this.
* include/bits/charconv.h: Use __is_signed_type instead.
* include/bits/locale_facets.tcc: Likewise.
* include/bits/uniform_int_dist.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_function.
* g++.dg/ext/is_function.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 13 +
1 file changed, 13 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 3acd843f2f2..cc466e0f606 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 12
1 file changed, 12 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d306073a797..7fd29d8d9f2 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_const.
* g++.dg/ext/is_const.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 4
This patch optimizes the performance of the is_scalar trait by dispatching to
the new __is_scalar built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scalar): Use __is_scalar built-in
trait.
(is_scalar_v): Likewise.
Signed-off-by: Ken Matsui
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_reference.
* g++.dg/ext/is_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
This patch optimizes the performance of the is_unsigned trait by dispatching
to the new __is_unsigned built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
(is_unsigned_v): Likewise.
Signed-off-by: Ken Matsui
.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 7fd29d8d9f2..d7f89cf7c06 100644
--- a/libstdc++-v3/include
.
(is_member_object_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index e1b10240dc2..792213ebfe8
original implementation.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index cc466e0f606..88171e1a672 100644
/ChangeLog:
* include/bits/cpp_type_traits.h (__is_arithmetic): Rename to ...
(__is_arith): ... this.
* include/c_global/cmath: Use __is_arith instead.
* include/c_std/cmath: Likewise.
* include/tr1/cmath: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp
/pr57107.C: Likewise.
libstdc++-v3/ChangeLog:
* include/bits/cpp_type_traits.h (__is_pointer): Rename to ...
(__is_ptr): ... this.
* include/bits/deque.tcc: Use __is_ptr instead.
* include/bits/stl_algobase.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
/valarray_array.h: Likewise.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 ++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 4 +++
gcc/testsuite/g++.dg/ext/has-builtin-1.C| 3 ++
gcc/testsuite/g++.dg/ext/is_scalar.C
This patch optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc
This patch optimizes the performance of the is_unbounded_array trait by
dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_member_pointer.
* g++.dg/ext/is_member_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def
__remove_pointer.
* g++.dg/ext/remove_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 5 +++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 ++
gcc/testsuite/g++.dg/ext/remove_pointer.C | 51
.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__is_member_object_pointer.
* g++.dg/ext/is_member_object_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3
:
* Evaluated all paddings affected by the enum rid change
Changes in v11:
* Merged all patches into one patch series
* Rebased on top of trunk
* Unified commit message style
* Used _GLIBCXX_USE_BUILTIN_TRAIT
Ken Matsui (40):
c++: Sort built-in identifiers
): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_bounded_array.
* g++.dg/ext/is_bounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc| 3 ++
gcc/cp/cp-trait.def | 1
. Optimize its
implementation.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 8
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 44 insertions(+), 8
This patch optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__is_member_function_pointer.
* g++.dg/ext/is_member_function_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc
This patch optimizes the performance of the is_array trait by dispatching to
the new __is_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_array): Use __is_array built-in trait.
(is_array_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the performance of the is_const trait by dispatching to
the new __is_const built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __is_const built-in trait.
(is_const_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_unsigned.
* g++.dg/ext/is_unsigned.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_array.
* g++.dg/ext/is_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 4
This patch optimizes the performance of the remove_pointer trait by
dispatching to the new remove_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
.
(finish_trait_expr): Likewise.
(finish_trait_type): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Sort built-in identifiers
alphabetically.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 68 -
gcc/cp/cp-trait.def
.
(is_member_function_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 16
1 file changed, 16 insertions(+)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index d7f89cf7c06..e1b10240dc2
This patch implements built-in trait for std::is_reference.
gcc/cp/ChangeLog:
* cp-trait.def (names_builtin_p): Define __is_reference.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/Change
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in trait.
---
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 2bd607a8b8f..18408d8ceb6 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/incl
* cp-trait.def (names_builtin_p): Define __is_reference.
This changelog should be the following.
* cp-trait.def: Define __is_reference.
I am sorry for the confusion.
On Sat, Mar 18, 2023 at 9:07 PM Ken Matsui wrote:
>
> This patch implements built-in trait for std::is_reference.
>
This patch implements built-in trait for std::remove_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __remove_pointer.
* semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer.
* g++.dg/ext/remove
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __remove_pointer built-in trait.
---
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 2bd607a8b8f..cba98091aad 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/i
I see. Thank you!
On Mon, Mar 20, 2023 at 12:26 AM Xi Ruoyao wrote:
>
> You need to CC libstd...@gcc.gnu.org for any patches touching libstdc++.
>
> On Sat, 2023-03-18 at 21:21 -0700, Ken Matsui via Gcc-patches wrote:
> > libstdc++-v3/ChangeLog:
> >
> > * include
CCing libstd...@gcc.gnu.org.
On Sun, Mar 19, 2023 at 7:53 PM Ken Matsui wrote:
>
> libstdc++-v3/ChangeLog:
>
> * include/std/type_traits (is_reference): Use __remove_pointer built-in trait.
>
> ---
> diff --git a/libstdc++-v3/include/std/type_traits
> b/libstdc++-v3
This patch implements built-in trait for std::add_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __add_pointer.
* semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer.
* g++.dg/ext/add_pointer.C: New
e,
> the code fails to build.
Oooh, this one! [PATCH 3/7] - the third patch in a series of seven patches
I totally missed that. Thank you!
On Mon, Mar 20, 2023 at 12:51 AM Xi Ruoyao wrote:
>
> On Mon, 2023-03-20 at 00:30 -0700, Ken Matsui wrote:
> > I see. Thank you!
>
&g
struct __add_pointer_helper
On Mon, Mar 20, 2023 at 12:57 AM Jonathan Wakely wrote:
>
>
>
> On Mon, 20 Mar 2023, 07:32 Ken Matsui via Libstdc++,
> wrote:
>>
>> CCing libstd...@gcc.gnu.org.
>>
>> On Sun, Mar 19, 2023 at 7:53 PM Ken Matsui wrote:
Thank you!
On Mon, Mar 20, 2023 at 1:07 AM Xi Ruoyao wrote:
>
> On Mon, 2023-03-20 at 01:03 -0700, Ken Matsui wrote:
> > Oops, I assumed those were my email... Thank you for your heads up and
> > your comments!
> >
> > > Bad ChangeLog format. You should h
, Xi Ruoyao via Libstdc++
> wrote:
> >
> > On Mon, 2023-03-20 at 01:03 -0700, Ken Matsui wrote:
> > > Oops, I assumed those were my email... Thank you for your heads up and
> > > your comments!
> > >
> > > > Bad ChangeLog format. You sho
This patch implements built-in trait for std::is_reference.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_reference.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/te
This patch lets libstdc++ use new built-in trait __is_reference.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/
It looks like I was able to use git send-email. The new patches became
a series, so I couldn't figure out how to associate them with this
email and another email. Please disregard this email.
On Mon, Mar 20, 2023 at 2:56 AM Ken Matsui wrote:
>
> > Does it actually make compilation
I created new patches which is a series, but I couldn't figure out how
to associate them with this email and another email. Please disregard
this email.
On Sun, Mar 19, 2023 at 1:19 PM Ken Matsui wrote:
>
> * cp-trait.def (names_builtin_p): Define __is_reference.
>
> This change
Thank you!
On Mon, Mar 20, 2023 at 2:12 AM Jonathan Wakely
wrote:
> On Mon, 20 Mar 2023 at 08:08, Ken Matsui
> wrote:
> >
> > Ooh... Thank you for pointing that out!
> >
> > > The helper doesn't need to be defined for the case where we don't use
>
Thank you so much for taking the benchmark! This is a great improvement
than I thought.
In GCC contributions, do I need to benchmark (and report) every built-in
trait I implement?
On Mon, Mar 20, 2023 at 8:24 AM Patrick Palka wrote:
> On Mon, Mar 20, 2023 at 5:56 AM Ken Matsui
>
This patch implements built-in trait for std::remove_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __remove_pointer.
* semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __remove_poin
This patch lets libstdc++ use new built-in trait __remove_pointer.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
---
libstdc++-v3/include/std/type_traits | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff -
Please disregard this email.
On Sun, Mar 19, 2023 at 1:21 PM Ken Matsui
wrote:
> This patch implements built-in trait for std::remove_pointer.
>
> gcc/cp/ChangeLog:
>
> * cp-trait.def: Define __remove_pointer.
> * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER.
Please disregard this email.
On Mon, Mar 20, 2023 at 6:26 AM Ken Matsui
wrote:
> Thank you!
>
> On Mon, Mar 20, 2023 at 2:12 AM Jonathan Wakely
> wrote:
>
>> On Mon, 20 Mar 2023 at 08:08, Ken Matsui
>> wrote:
>> >
>> > Ooh... Thank you for poin
Please disregard this patch.
On Mon, Mar 20, 2023 at 12:44 AM Ken Matsui
wrote:
> This patch implements built-in trait for std::add_pointer.
>
> gcc/cp/ChangeLog:
>
> * cp-trait.def: Define __add_pointer.
> * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER.
>
>
This patch lets libstdc++ use new built-in trait __add_const.
libstdc++-v3/ChangeLog:
* include/std/type_traits (add_const): Use __add_const built-in trait.
---
libstdc++-v3/include/std/type_traits | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libstdc++-v3/include/std/type_tr
This patch implements built-in trait for std::add_const.
gcc/cp/ChangeLog:
* cp-trait.def: Define __add_const.
* semantics.cc (finish_trait_type): Handle CPTK_ADD_CONST.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __add_const.
* g++.d
I want to implement and then come back here.
Thank you all for your help.
On Tue, Mar 21, 2023 at 4:25 AM Jonathan Wakely wrote:
>
>
> On Tue, 21 Mar 2023 at 11:21, Marc Glisse via Libstdc++ <
> libstd...@gcc.gnu.org> wrote:
>
>> On Tue, 21 Mar 2023, Ken
This patch implements built-in trait for std::is_function.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_function.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/tests
This patch lets libstdc++ use new built-in trait __is_function.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_function): Use __is_function built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/std
This patch implements built-in trait for std::is_unsigned.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_unsigned.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/tests
This patch lets libstdc++ use new built-in trait __is_unsigned.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/std
I see. Thank you!
On Tue, Mar 21, 2023 at 9:44 AM Jonathan Wakely wrote:
>
>
> On Tue, 21 Mar 2023 at 16:41, Ken Matsui via Libstdc++ <
> libstd...@gcc.gnu.org> wrote:
>
>> This patch lets libstdc++ use new built-in trait __is_unsigned.
>>
>> libstdc++-v3
This patch implements built-in trait for std::is_unsigned.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_unsigned.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/tests
This patch lets libstdc++ use new built-in trait __is_unsigned.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/incl
This patch implements built-in trait for std::is_array.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_array.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/Chan
This patch lets libstdc++ use new built-in trait __is_array.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_array): Use __is_array built-in trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/std/type_trai
This patch implements built-in trait for std::is_const.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_const.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/testsuite/Chan
This patch lets libstdc++ use new built-in trait __is_const.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __is_const built-in trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/include/std/type_trai
It seems I missed including Jonathan in the new patch. Could you
please take a look?
On Tue, Mar 21, 2023 at 10:07 AM Ken Matsui wrote:
>
> This patch implements built-in trait for std::is_unsigned.
>
> gcc/cp/ChangeLog:
>
> * cp-trait.def: Define __is_unsigned.
>
This patch implements built-in trait for std::is_volatile.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_volatile.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/tests
This patch lets libstdc++ use new built-in trait __is_volatile.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/incl
This patch implements built-in trait for std::is_unsigned.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_unsigned.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
gcc/tests
This patch lets libstdc++ use new built-in trait __is_unsigned.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file changed, 7 insertions(+)
diff --git a/libstdc++-v3/incl
In the type_traits header, both integral_constant and __bool_constant
are used. This patch unifies those usages into __bool_constant.
libstdc++-v3/ChangeLog:
* include/std/type_traits: Use __bool_constant instead of
integral_constant.
---
libstdc++-v3/include/std/type_traits | 32
patches. I
would prefer to choose the more common and lightweight way.
Sincerely,
Ken Matsui
On Thu, Mar 23, 2023 at 2:28 AM Jonathan Wakely wrote:
>
>
>
> On Thu, 23 Mar 2023 at 02:06, Ken Matsui via Libstdc++
> wrote:
>>
>> In the type_traits header, both integral_c
On Thu, Mar 23, 2023 at 3:46 AM Ville Voutilainen
wrote:
>
> On Thu, 23 Mar 2023 at 12:18, Ken Matsui via Libstdc++
> wrote:
> >
> > Thank you so much for your review!
> >
> > This is my first time contributing to GCC, so I do not have a GCC
> > copyrig
On Thu, Mar 23, 2023 at 3:56 AM Ville Voutilainen
wrote:
>
> On Thu, 23 Mar 2023 at 12:53, Ken Matsui wrote:
>
> > > DCO sign-off is indeed more light-weight, and sure, it's becoming more
> > > common
> > > since it's relatively new as an option.
&g
In the type_traits header, both integral_constant and __bool_constant
are used. This patch unifies those usages into __bool_constant.
libstdc++-v3/ChangeLog:
* include/std/type_traits: Use __bool_constant instead of
integral_constant.
Signed-off-by: Ken Matsui
---
libstdc++-v3
l_constant,
which can be mostly shared. That is, the purpose of built-in traits is
considered as achieved.
Ken Matsui (10):
c++: implement __is_reference built-in trait
libstdc++: use new built-in trait __is_reference for std::is_reference
c++: implement __is_function built-in trait
libstd
This patch gets std::is_reference to dispatch to new built-in trait
__is_reference.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 7 +++
1 file
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_reference.
* g++.dg/ext/is_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
This patch removes unused __is_void defined in cpp_type_traits.h
libstdc++-v3/ChangeLog:
* include/bits/cpp_type_traits.h (__is_void): Remove unused __is_void.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 15 ---
1 file changed, 15 deletions
1101 - 1200 of 1225 matches
Mail list logo