  We prove that if $M\subset \mathbb{R}^n$ is a bounded subanalytic submanifold
of $\mathbb{R}^n$ such that $B(x_0,\epsilon)\cap M$ is connected for every
$x_0\in\overline{M}$ and $\epsilon>0$ small, then, for $p\in [1,\infty)$
sufficiently large, the space $C^\infty(\overline{M})$ is dense in the Sobolev
space $W^{1,p}(M)$. We also show that for $p$ large, if $A\subset
\overline{M}\setminus M$ is subanalytic then the restriction mapping $
C^\infty(\overline{M})\ni u\mapsto u_{|A}\in L^p(A)$ is continuous (if $A$ is
endowed with the Hausdorff measure), which makes it possible to define a trace
operator, and then prove that compactly supported functions are dense in the
kernel of this operator. We finally generalize these results to the case where
our assumption of connectedness at singular points of $\overline{M}$ is
dropped.
