Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: has clang __PRETTY_FUNCTION__ behavior changed in clang 16.0.0 ? #518

Open
dkrejsa opened this issue Jun 20, 2023 · 1 comment

Comments

@dkrejsa
Copy link

dkrejsa commented Jun 20, 2023

Hi,

This is a question relating to the experimental/type_name.hpp implementation with Clang.

I'm using Boost 1.81 and seeing a compilation failure building the hana experimental/type_name test using Clang 16.0.0,
albeit in a cross-build environment for VxWorks. I build with -std=c++14.

Part of the issue seems to be that for the boost::hana::experimental::detail::type_name_impl2<int>() function, clang is yielding

"cstring boost::hana::experimental::detail::type_name_impl2() [T = int]"

for __PRETTY_FUNCTION__, rather than yielding

"boost::hana::experimental::detail::cstring boost::hana::experimental::detail::type_name_impl2() [T = int]"

as type_name.hpp seems to expect. That is, the "cstring" return type in the __PRETTY_FUNCTION__ I see omits the namespace path "boost::hana::experimental::detail::".

Is this something new with Clang 16.0.0, or is it perhaps an issue of some option affecting the compiler behavior, that might be different in my environment? Any advice appreciated.

@dkrejsa
Copy link
Author

dkrejsa commented Jun 20, 2023

Here's an example on godbolt, with Clang 16.0.0

https://godbolt.org/z/3rbaf4Ynv

and with Clang 15.0.0

https://godbolt.org/z/9P7eeWh8a

OK, I was worried this might be restricted to my environment, but it seems to be more general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant