Let GCC read from stdin for file contents, so we need one less file.  Additionally, use a temporary file from mktemp for our executable.
Read until we can't read anymore, then stop reading.