Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • I thought this would be about adding a switch by which to undo every silent code removal operation because the compiler concluded a section includes undefined behavior in some obscure case, like overflow. And doing so silently. So when you recompile on a new compiler, on embedded, your code now fails. Can't do that Dave.

    How did we ever get here??

    As a user that's so outrageous it must be a deliberate conspiracy against C. I'm sure it isn't but it certainly helps it's demise, as the feeling the tool is in the hands of imbeciles that mistake the trees for he forest. C now requires you to be an expert on undefined behavior, and the psychology regarding the matter, while previously C would be forgiving.

    So I thought the article would be about --forgive --generous, or --embedded while there should have been --petty in the first place.

  • I wish they added some simple form of generics so that one could, for example, create types like "list of files", "list of processes" without duplicating the code.

    Also, something for RAII, so that one could automatically deallocate allocated memory.

  • > The question here is: can the compiler hoist the final division operation above assignment to x?

    A division calculation not a visible effect. Therefore the question doesn't even m ake sense: it's asking: can we see something that is not a visible effect (division) before or after a visible effect (modification of a volatile object).

Explore Birbla archives