If I do this:
#define F a
F/
It expands to a/ godbolt
If I do this:
#define F /
F/
It expands to / / with a space in between goodbolt
But if I convert it to a string, and print it, it doesn't add any spaces goodbolt:
#include <stdio.h>
#define STR_IMPL(x) #x
#define STR(x) STR_IMPL(x)
#define F /
int main() {
puts(STR(F/));
}
Why is there a space in between, but only some of the time? Is it allowed to add more spaces in other cases?