Two polls coming. I'm curious about the same question but from two different perspectives. When you are programming, *of these choices*, what is most important *to you*?
That's kinda a strawman of a UB case. This (https://godbolt.org/z/3Dsj4L ) is also UB, but it happens all the time in code that has been running for years. If absolutely no UB is the only definition of "correct", there likely isn't a project outside of toys that are correct.
-
-
Accessing an object after its lifetime has ended is in no way a strawman. You could argue it's slideware and over simplified, but it's the class of bug people deal with every day. If the memory has not yet been reused, it will appear to work.
-
I worked with a client once who had MANY rather obscure and hard-to-replicate failures. They felt that errors were random in nature. It turned out that 80% of them were pointer errors; the dev staff always passed pointers to everything and had no policy to communicate...
- Näytä vastaukset
Uusi keskustelu -
-
-
This is probably not too far off from true, most software has some undefined behavior someplace. If you use sanitizers and other tools such as static analysis you will catch most that matter. Strict aliasing violations and uninitialized memory being two big exceptions.
-
the strict aliasing warning tools are not as good as I would like from gcc et al
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.