aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-05-15 14:48:35 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-05-15 12:48:35 +0000
commit511604823d33a79a88eaa12e881badd2170a0614 (patch)
tree654df86ab6d145901b39ae448432b4053f2db1f8 /gcc
parent47210a041b3b40319b8dee64f00d479b1781eb57 (diff)
downloadgcc-511604823d33a79a88eaa12e881badd2170a0614.zip
gcc-511604823d33a79a88eaa12e881badd2170a0614.tar.gz
gcc-511604823d33a79a88eaa12e881badd2170a0614.tar.bz2
Do not allow empty argument of -o option (PR driver/31468).
2017-05-15 Martin Liska <mliska@suse.cz> PR driver/31468 * gcc.c (process_command): Do not allow empty argument of -o option. From-SVN: r248060
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/gcc.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0654ce7..93a8b23 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-15 Martin Liska <mliska@suse.cz>
+
+ PR driver/31468
+ * gcc.c (process_command): Do not allow empty argument of -o option.
+
2017-05-15 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 120c5c0..4724276 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4478,6 +4478,9 @@ process_command (unsigned int decoded_options_count,
output_file);
}
+ if (output_file != NULL && output_file[0] == '\0')
+ fatal_error (input_location, "output filename may not be empty");
+
/* If -save-temps=obj and -o name, create the prefix to use for %b.
Otherwise just make -save-temps=obj the same as -save-temps=cwd. */
if (save_temps_flag == SAVE_TEMPS_OBJ && save_temps_prefix != NULL)