https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68075
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The order of the get_db_insert_string function calls in printf ("%s, %s, %s, %s, %s, %s\n", get_db_insert_string (db_val, &val[0][0]), get_db_insert_string (db_val, &val[1][0]), get_db_insert_string (db_val, &val[2][0]), get_db_insert_string (db_val, &val[3][0]), get_db_insert_string (db_val, &val[4][0]), get_db_insert_string (db_val, &val[5][0])); is not specified in C. So both answers are correct and your expectations for the order of the function calls is incorrect.