Wouldn't normal input redirection work? Say:
Code:
$ gcc --save-temps --verbose ex1.c -o ex1 2> gcc_errors.txt