public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/11633] g++ does not initialize structures when auto-increment variables are used Date: Tue, 22 Jul 2003 23:36:00 -0000 [thread overview] Message-ID: <20030722233651.17805.qmail@sources.redhat.com> (raw) In-Reply-To: <20030722205341.11633.msimons@simons-clan.com> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11633 ------- Additional Comments From bangerth at dealii dot org 2003-07-22 23:36 ------- Commas separating function call arguments are not sequence points, so foo(x++, x++) can really be evaluated in different ways. On the other hand, commas in comma expressions as in while (x++, x++) _are_ sequence points, so the order of evaluation is defined. The only question which I can't answer from the standard is whether commas in initializer expressions are sequence points. If the order of evaluation is undefined, then the fact that some compilers implement one way of doing things is not a reason to rely on a feature. Likewise, random changes to the code _may_ make the code do what you expect, but the code still triggers undefined behavior and may break again with the next compiler version. The only way around this is to make the code use only well defined semantics. W.
next prev parent reply other threads:[~2003-07-22 23:36 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-07-22 20:53 [Bug c++/11633] New: " msimons at simons-clan dot com 2003-07-22 20:55 ` [Bug c++/11633] " msimons at simons-clan dot com 2003-07-22 21:41 ` bangerth at dealii dot org 2003-07-22 21:55 ` bangerth at dealii dot org 2003-07-22 22:10 ` msimons at simons-clan dot com 2003-07-22 23:19 ` msimons at simons-clan dot com 2003-07-22 23:36 ` bangerth at dealii dot org [this message] 2003-07-23 1:09 ` msimons at simons-clan dot com 2003-07-23 9:04 ` nathan at gcc dot gnu dot org 2003-08-23 17:11 ` pinskia at gcc dot gnu dot org 2003-11-21 16:55 ` pinskia at gcc dot gnu dot org 2003-11-21 16:57 ` pinskia at gcc dot gnu dot org 2004-04-30 1:47 ` [Bug c++/11633] [DR 430] " pinskia at gcc dot gnu dot org 2004-04-30 18:17 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030722233651.17805.qmail@sources.redhat.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).