Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

12
  • 47
    Most likely its you. Commented Sep 26, 2011 at 7:54
  • 10
    @littleadv, even the recent versions of gcc and msvc are full of bugs, so I would not be so sure. Commented Sep 26, 2011 at 7:57
  • 4
    You have all warnings enabled? Commented Sep 26, 2011 at 11:18
  • 4
    FWIW: 1) I try not to do anything tricky that might tempt the compiler to mess up, 2) the only place the optimization flags matter (for speed) is in code where the program counter spends a significant fraction of its time. Unless you're writing tight cpu loops, in many applications the PC spends essentially all of its time deep in libraries, or in I/O. In that kind of app, the /O switches don't help you at all. Commented Sep 26, 2011 at 15:33
  • 2
    Can you check with a different compiler? That would be a proof that your c++ is fine and could point towards a compiler issue. Commented Jun 27, 2016 at 5:34