Seems that this should be an easy thing to do, redirect SDTOUT and STDERR of the clang++ compiler to a file; however, the diagnostic info continues to output to the display terminal if only STDOUT is implicitly specified, e.g.,
Is there some other file pointer that clang is using for diagnostic output?
# clang++ -v 'file' >x.out
, and an empty x.out file is created. If STDERR is included in the command, # clang++ -v 'file' >x.out 2>&1
, the system complains of "ambiguous redirect". My understanding of this construct is to redirect STDERR (2) to STDOUT (1) and both should be written to x.out.Is there some other file pointer that clang is using for diagnostic output?