You've got a typo. You're missing the argument definition for the defun. In this case, since the function my-c-mode-common-hook doesn't take any argumentrarguments, add an empty set of parens after the function name.
(defun my-c-mode-common-hook ()
(define-key c-mode-map (kbd "C-<f12>") 'compile))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)