You could get around this by:
sgn[x_] := Piecewise[{{-1, x < 0}, {0, x == 0}, {1, x > 0}}]
sgn'[x]
(* Piecewise[{{0, x < 0 || x > 0}}, Indeterminate] *)
D[sgn[x], x]
(* iecewise[{{0, x < 0 || x > 0}}, Indeterminate] *)
I'm showing the InputForm
of each output. In a notebook you'll actually see the usual nice display, with a big left brace enclosing the separate cases on each line.