This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/68075] Printf is changing the order of values
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Oct 2015 06:43:44 +0000
- Subject: [Bug c/68075] Printf is changing the order of values
- Auto-submitted: auto-generated
- References: <bug-68075-4 at http dot gcc dot gnu dot org/bugzilla/>
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.