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]

compilation error of odd C/C++ program


I have attached the appropriate files (according to the "How to Report Bugs"
section of the faq).  Due to the lack of a specified order of evaluation in
some arithmetic expressions in C/C++, this program has more than one
possible correct output.  However, I'm quite certain that the output it
produces when compiled with g++, with no optimization is not a possible
correct output.  I have included that in the command line session I copied
and pasted.  The files I'm sending are:

weird.C:  short program illustrating the issue
weird.ii:  the output the faq says to include
forgnu:  I copied and pasted the command line messages when I compiled and
ran it, like the faq said to.

Thanks.

Tobias A. Brick
(541) 346-4392


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