[dcl.attr.indet]

# 9 Declarations [[dcl]](./#dcl)

## 9.13 Attributes [[dcl.attr]](dcl.attr#indet)

### 9.13.6 Indeterminate storage [dcl.attr.indet]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/declarations.tex#L9837)

The [*attribute-token*](dcl.attr.grammar#nt:attribute-token "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]") indeterminate may be applied
to the definition of a block variable with automatic storage duration or
to a [*parameter-declaration*](dcl.fct#nt:parameter-declaration "9.3.4.6 Functions [dcl.fct]") of a function declaration[.](#1.sentence-1)

No [*attribute-argument-clause*](dcl.attr.grammar#nt:attribute-argument-clause "9.13.1 Attribute syntax and semantics [dcl.attr.grammar]") shall be present[.](#1.sentence-2)

The attribute specifies
that the storage of an object with automatic storage duration
is initially indeterminate rather than erroneous ([[basic.indet]](basic.indet "6.8.5 Indeterminate and erroneous values"))[.](#1.sentence-3)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/declarations.tex#L9846)

If a function parameter is declared with the indeterminate attribute,
it shall be so declared in the first declaration of its function[.](#2.sentence-1)

If a function parameter is declared with
the indeterminate attribute in the first declaration of its function
in one translation unit and
the same function is declared without the indeterminate attribute
on the same parameter in its first declaration in another translation unit,
the program is ill-formed, no diagnostic required[.](#2.sentence-2)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/declarations.tex#L9856)

[*Note [1](#note-1)*:

Reading from an uninitialized variable
that is marked [[indeterminate]] can cause undefined behavior[.](#3.sentence-1)

void f(int);void g() {int x [[indeterminate]], y;
 f(y); // erroneous behavior ([[basic.indet]](basic.indet "6.8.5 Indeterminate and erroneous values")) f(x); // undefined behavior}struct T { T() {}int x;};int h(T t [[indeterminate]]) { f(t.x); // undefined behavior when called belowreturn 0;}int _ = h(T()); â *end note*]
