mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Don't overwrite the input file.
* src/files.c (output_file_name_check): Fatal error if using input file for output. * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status argument. (Conflicting output files): Add test.
This commit is contained in:
@@ -351,6 +351,8 @@ compute_output_file_names (void)
|
||||
void
|
||||
output_file_name_check (char const *file_name)
|
||||
{
|
||||
if (0 == strcmp (file_name, grammar_file))
|
||||
fatal (_("refusing to overwrite the input file %s"), quote (file_name));
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < file_names_count; i++)
|
||||
|
||||
Reference in New Issue
Block a user