This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -save-temps from clobbering input file@apple.com
Ira Ruben <ira@apple.com> writes:
|> At 9:32 PM +0100 11/11/01, Andreas Schwab wrote:
|>
|> >|> + strncpy ((char *)temp_filename, input_basename, basename_length);
|> >|> + strncpy ((char *)temp_filename + basename_length, suffix,
|> >|> + suffix_length);
|> >|> + *((char *)temp_filename + temp_filename_length) = '\0';
|> >
|> >You should temporarily use a different variable to remove the need for
|> >these casts.
|>
|> And not using casts is wrong because...why?
Casts are bad if you can easily avoid them, since they can hide bugs.
|> Let's not get into a stylistic debate here.
Please read <http://gcc.gnu.org/codingconventions.html>, this is on-topic.
Andreas.
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5