4 ms·
Yes, that's exactly why they'd use _Auto and a header to redefine the keyword. Existing code that does auto x = 3; (implicit int type) wouldn't break, but #incl
by PeCaN 11y ago
Yes, that's exactly why they'd use _Auto and a header to redefine the keyword. Existing code that does auto x = 3; (implicit int type) wouldn't break, but #include <stdauto.h> auto x = 4.2f; would be the new meaning.
- _kst_ 11y agoExisting code that does "auto x = 3;" is already broken; the "implicit int" rule was removed in C99. But "auto int x = 3;" is valid (and the "auto" keyword is useless in that context).