This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/68075] Printf is changing the order of values


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]