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

Use __func__ rather than __FUNCTION__ for C99 onwards #781

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nigels-com
Copy link

In make debug=1 mode for gcc 13.3.0, lots of warnings about the use of FUNCTION

debug.h:46:65: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
   46 |                 printf("%-12s +%-4u %-20s : ",__FILE__,__LINE__,__FUNCTION__); \
      |                                                                 ^~~~~~~~~~~~

For C99 onwards, use func instead.

@nigels-com
Copy link
Author

Updated to use __func__ for clang builds too.

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.

1 participant