I have minimized my code to just what is necessary to reproduce this error. I have what I believe is a perfectly fine if statement, but gcc insists that it is not a valid statement.
#define SOMECHAR *
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char* my_string = (char*) malloc(sizeof(char[5]));
strcpy(my_string, "aa*a");
int i;
for (i=0; i< sizeof(my_string); i++){
if(strcmp(&my_string[i], SOMECHAR) == 0){
printf("%s", "b");
} else {
printf("%s", &my_string[i]);
}
}
}