C11 support ; removed debug as a global variable