On Tue, 28 Feb 2023 at 10:58, Berke Yavas via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi,
>
> I am Berke. I am interested in the project C++: Implement compiler built-in
> traits for the standard library traits for the upcoming GSoC. I am a
> Software Engineer with a year of experience. I am very excited to have a
> chance to work on gcc.

Great, thanks for your interest in the project.

> So far, I have built gcc from source, runned tests. Have a few follow up
> questions.
>
> 1. Project is related with C++ frontend and library development, so during
> the development there should be no issue configuring with
> --disable-bootstrap --disable-multilib --disablelibstdcxx-pch(Thanks to irc
> folks who suggested the latter 2, I just wanted to confirm) right?

That's fine.

> 2. Is there any other built-in compiler traits that are not in the file
> `gcc/cp/cp-trait.def`?
> 3. __is_same built in is already used in a couple of places in libstdc++.
>
> File: libstdc++-v3/include/bits/c++config
>    840 #if _GLIBCXX_HAS_BUILTIN(__is_same)
>     841 #  define _GLIBCXX_HAVE_BUILTIN_IS_SAME 1
>     842 #endif
>
> Is this the file where gcc checks if the compiler built in is available? So
> other compiler built-ins should be checked here too?

No, that's old code that's done differently for historical reasons.
For new built-ins you can just use __has_builtin instead. There are
lots of examples of using that in <type_traits>.

Reply via email to