This is a shell issue, not really an issue with cc. The question is how to redirect the stderr output stream (the simple “cc file.c > file.msg” only redirects stdout). Under the common Unix shells (Bourne and C shells) you can do
“(cc file.c > file.out) >& file.err”
to send stdout to file.out and stderr to file.err.
“cc file.c >& file.msg”
will send both stdout and stderr to file.msg (though the different buffering of stdout and stderr means that the messages might be mingled together; stderr messages will often appear earlier than you would expect).
It looks like you’re trying to use the Bourne shell file-descriptor redirections, but I don’t think you’re using quite the right syntax. It should be something like
“cc file.c 1>file.e1 2>file.e2”
to send stdout (fd 1) to file.e1 and stderr (fd 2) to file.e2.