Skip to content

Conversation

sunfishcode
Copy link
Member

wasi-libc builds special versions of printf and other routines optimized
for the case where long double and floating-point in general are not
needed. Ensure that everything still compiles and runs.

wasi-libc builds special versions of printf and other routines optimized
for the case where long double and floating-point in general are not
needed. Ensure that everything still compiles and runs.
@@ -0,0 +1,8 @@
#include <stdio.h>

volatile double x = 42.0;
Copy link
Member

Choose a reason for hiding this comment

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

Is volatile needed here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just an abundance of caution; the point is to test the libc printf; if a compiler ever somehow constant-folds this into the printf string, that would defeat the point.

@sunfishcode sunfishcode merged commit a6c0a9b into master Jan 17, 2020
@sunfishcode sunfishcode deleted the test-printf branch January 17, 2020 17:16
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