You should keep in mind analytic continuation. Let $f:\mathbb R\rightarrow\mathbb R$ be a $C^\infty$ function ; if there exists an entire function extending $f$, then
(1) It is unique by analytic continuation,
(2) The function $f$ must be real-analytic.
Of course (2) is not sufficient: think about the real-analytic $x\mapsto\frac{1}{1+x^2}$, which does NOT have an entire extension, since by analytic continuation, that extension should coincide with $\mathbb C\ni z\mapsto \frac{1}{1+z^2}$, which has poles at $\pm i$. For a $C^\infty$ real-valued function real-analytic $f$ on the real line, f$, you can formulate a criterion dealing with the size of derivatives. Such a function has an entire extension iff $$\forall R>0,\exists C_R,\forall n\in\mathbb N,\quad \vert f^{(n)}(0)\vert\le C_R\frac{n!}{R^n}. $$ On the other hand, real-analyticity of a $C^\infty$ $f$ on the real line is equivalent to $$ \forall x\in \mathbb R,\exists r>0,\exists C>0, \exists R>0,\forall n\in\mathbb N,\quad \Vert f^{(n)}\Vert_{L^\infty(B(x,r))}\le C\frac{n!}{R^n}. $$

