There are two types of spectral theorems in functional analysis: for bounded and for unbounded operators. In the first one, one considers a bounded self-adjoint operator $A$ on a Hilbert space $\mathscr{H}$ and the functional calculus is defined for functions $C(\sigma(A);\mathbb{C})$, that is, continuous functions defined on the spectrum $\sigma(A)$ to $\mathbb{C}$. The spectrum, in this case, is a compact subset of $\mathbb{R}$.
At least the versions I know about for the unbounded case establish the functional calculus first for measurable functions $f: \mathbb{R}\to \mathbb{C}$, and the spectrum $\sigma(A)$ of the underlying self-adjoint operator is not explicitly mentioned. However, this looks odd to me: sometimes with talk about functions which are not defined on $\mathbb{R}$; an example is when one considers $A^{-\frac{1}{2}}$ which is not defined at $x=0$. Because of this, I went back to the proofs of these results and it seems to be that a function $f(A)$ will make sense provided $f$ is defined and measurable on $\sigma(A)$ as well, which this time is not compact. Am I missing something or this is actually the case?