xxxxxxxxxx
// On the other hand, with CIR, all identifiers in functions are bound at the
// parsing stage before the function is even run at compile time.
// Thus, the puts() in sayHello() here is bound to the puts() in global scope.
// The output from CIR is thus correct.
#include <cir.h>
#include <cirq.h>
int puts(const char *);
static CirCodeId sayHello(void) {
// puts() here is bound to the puts() in global scope.
return @CirQ(puts("Hello World!"));
}
int main(void) {
int puts = 0; // puts is shadowed here, but it doesn't affect sayHello()
@sayHello();
return 0;