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

Add overloadable attributes for vsnprintf and snprintf #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illiminable
Copy link

  • Adds overloadable attributes for clang.

- Adds overloadable attributes for clang.
@illiminable
Copy link
Author

Ran into this while trying to port to Chrome OS.

@brarcher
Copy link
Contributor

To date the project has been building against GCC and Clang both, but no build issue has been found. Are you seeing an issue on more recent versions of Clang? Can you provide more description to the problem which was found and how this solves it, so I can have a better understanding of what issue is being addressed?

@illiminable
Copy link
Author

It may only be when using the -verify option, and if the standard library is appropriately annotated.

../../check-0.9.13/lib/libcompat.h:194:16: fatal error: redeclaration of 'rpl_vsnprintf' must have the 'overloadable' attribute
CK_DLL_EXP int rpl_vsnprintf(char *, size_t, const char *, va_list);
^
../../../../../../../usr/include/stdio.h:396:12: note: previous overload of function is here
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
^
../config.h:362:19: note: expanded from macro 'vsnprintf'
#define vsnprintf rpl_vsnprintf
^

@brarcher
Copy link
Contributor

Oh, OK. Is using -verify something that should be done in the CI builds to ensure now new breakage is introduced in the future? It sounds from the Clang documentation that -verify is used to pass information from the compiler to an IDE, but it is not entirely clear to me.

Can you mention some of your comment in the commit message? I'll then merge the pull request.

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.

2 participants