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

[printf] Test empty format string, and empty arg string #2018

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

dneto0
Copy link
Contributor

@dneto0 dneto0 commented Jul 19, 2024

Issue: #1058

@dneto0
Copy link
Contributor Author

dneto0 commented Jul 19, 2024

I know that Clvk+Clspv fail on these.

@@ -714,6 +714,12 @@ testCase testCaseChar = {

std::vector<printDataGenParameters> printStringGenParameters = {

// empty format
{ {""}, "\"foo\"" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This results in a printf call with an excess data argument (printf("\n","foo");), but that should be fine according to the spec:

If the format is exhausted while arguments remain, the excess arguments are evaluated (as always) but are otherwise ignored.

@dneto0
Copy link
Contributor Author

dneto0 commented Jul 23, 2024

I don't have the ability to merge this PR. Please merge if you're happy with it.

@kpet kpet merged commit 0be82dc into KhronosGroup:main Jul 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants