It is really well known that if $f: \mathbf{R}\to \mathbf{R}$ is continuous and $$ \forall x,y \in \mathbf{R},\,\,\,\,f(x+y)=f(x)+f(y) $$ then $f$ is linear, i.e., there exists $a \in \mathbf{R}$ such that $f(x)=ax$ for all $x \in \mathbf{R}$.
More generally, it is known that if $f: K \to \mathbf{R}$ is continuous, where $K\subseteq \mathbf{R}$ is a non-empty open connected set with $K+K\subseteq K$, then the functional equation $$ \forall (x,y) \in K^2,\,\,\,\,f(x+y)=f(x)+f(y)\,\,\,\,\,\,\,\,\,\,\,(\star) $$ implies that $f$ is linear.
Here a related question:
Question. Does there exist a set $S\subseteq \mathbf{R}^2$ which is not dense in $\mathbf{R}^2$, not containing an open connected set, and such that if $f: \mathbf{R}\to \mathbf{R}$ is continuous function satisfying ($\star$) for all $(x,y) \in S$ then $f$ is linear?
Easy observation: $S$ cannot be bounded (see also the comment of TheoBandit below). Indeed, in the opposite, we could set $f(x)=0$ for all $x$ in a ball with sufficiently large radius; then, any continuous extension will work.