#include <stdio.h> #include <ctype.h> void strupr(char *str) { while (*str) { // str++; } } int main(void) { char texto[] = "teste"; strupr(texto); return 0; }
Standard input is empty
prog.c: In function 'strupr':
prog.c:6:13: error: operation on 'str' may be undefined [-Werror=sequence-point]
*str++ = toupper(*str);
^
cc1: all warnings being treated as errors
Standard output is empty