Automatic variable: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Line 10:
(Called ''automatic'' variables.)
 
All variables declared within a [[block (programming)|block]] of code are automatic by default. An uninitialized automatic variable has an [[undefined behavior|undefined]] value until it is assigned a valid value of its type.<ref>{{As of|2008|alt=Current}} {{PDFlinkcite web|[url= http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf |title=C standard] }}&nbsp;{{small|(3.61&nbsp;[[Mebibyte|MiB]]<!-- application/pdf, 3788603 bytes -->)}}: section 6.2.4, Storage durations of objects</ref>
 
Using the storage class <code>register</code> is a hint to the compiler to cache the variable in a processor register. Other than not allowing the referencing operator (<code>&</code>) to be used on the variable or any of its subcomponents, the compiler is free to ignore the hint.