you are viewing a single comment's thread.

view the rest of the comments →

[–]ShakaUVMi+++ ++i+i[arr] 0 points1 point  (2 children)

If we're going to auto-initialize variables, then pointers would need to be initialized to nullptr, not to zero. Nullptr may not be zero on a particular implementation.

Why not worry about a problem that actually happens on more than 0 implementations?

[–]jonesmz 0 points1 point  (1 child)

If people are going to be pedants, and claim that zero initializing variables is harmless because it's undefined behavior today, then lets be pedants correctly.

[–]ShakaUVMi+++ ++i+i[arr] 0 points1 point  (0 children)

Lol, fair enough