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

Fix pretty function magic constant overwriting #424

Merged
merged 2 commits into from
Dec 20, 2021

Conversation

landwehrj
Copy link
Contributor

@landwehrj landwehrj commented Dec 15, 2021

This would change the current behavior when printing for gcc/clang.

From:

test_io.cpp->TestBody:639

To:

test_io.cpp->virtual void CustomLogLevels_AddANonFatal_Test::TestBody():639

I replaced __FUNCTION__ with __func__ as the fallback because it seems like that is more standard because it is part of the c99/c++11 standards.

However, maybe __FUNCTION__ should be kept for backwards compatibility sake.

I changed the name of the macro, so it doesn't collide with the compiler versions.

@KjellKod KjellKod self-requested a review December 20, 2021 03:33
@KjellKod KjellKod linked an issue Dec 20, 2021 that may be closed by this pull request
@KjellKod
Copy link
Owner

Revisiting this and might have to revert some of these changes.

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

Successfully merging this pull request may close these issues.

__PRETTY_FUNCTION__ definition issue
2 participants