1
To keyword auto
, defined by the language C, is a keyword old and seemingly useless in the language. I know that in C its function is to define that it should be stored in stack as a local variable whose life ends with the end of the scope in which it was declared. I also know what it does in C++, although this is not the case.
That one keyword is really necessary and has some real use for the language. It seems to me useless, since all C scope variables are stored in the stack, and only through the use of specific functions is it possible to make use of the heap.
I remember reading something about macros that can make keyword self necessary, but I don’t know if this really has anything to do with my question.
None? Not even in older versions of the language? Has it been included in the language for future use? This would explain the lack of utility in versions prior to C++11, no?
– Nexus
I don’t really remember. I think I had reason to indicate to the compiler to put that in the register if he thought it was appropriate, as opposed to
register
that required doing so. Today every compiler makes this decision on its own without needing to specify anything, and even specifying is ignored.– Maniero