News for hackers. Stuff that matters.
Re:C for high level programmers (slides) by missblit on Sunday May 31, 2015 @10:11PM (#9636462)
Not only can the compiler make it false. It can assume that the code would never make the comparison in the first place, and optimize away any cases where the undefined behavior is guaranteed to be triggered.

So in a sense undefined behavior can travel back in time :O

Re:C for high level programmers (slides) by TheLoneWolfling on Sunday May 31, 2015 @11:15PM (#9636636)
Yep.

It's impossible to have actual modular code in C. A real shock for people coming from higher level languages.

Re:C for high level programmers (slides) by xcogiz on Monday June 01, 2015 @05:45AM (#9637530)
What exactly do you mean by modular code in your context?

edit: Oh, you probably meant modules integrated directly in the language. I was surprised to read that since modular design is highly successful and useful in C.

Re:C for high level programmers (slides) by TheLoneWolfling on Monday June 01, 2015 @08:17AM (#9637982)
No, I'm not talking about modules. I'm talking about modular code:

I mean that in many languages it's at least possible to write code that can be understood fully in isolation. Objected-oriented programming, etc, etc.

In C that's impossible. Due to UB being global.