News for hackers. Stuff that matters.
Re:Torvalds: Standards need to be questioned by bjourne on Tuesday June 05, 2018 @08:19PM (#17243367)
The difference is that the code you wrote actually is dumb, but relying on union aliasing is not. :) A behavior doesn't need to be defined by the spec as long as it is defined by the implementation (gcc) you are targeting.
Re:Torvalds: Standards need to be questioned by cjensen on Tuesday June 05, 2018 @08:32PM (#17243423)
The code I wrote was dumb... and yet Stroustroup repeatedly made a variant of the mistake in the "C++ Programming Language." Turns out that the use of operator<< in iostreams is problematic.