From 9eee5e726de1e5d11bc77e0f2ae05c9c0c0916b6 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 26 Jun 2003 06:05:36 +0000 Subject: c-opts.c (missing_arg): Make non-static. * c-opts.c (missing_arg): Make non-static. (c_common_handle_option): Don't check for missing arguments. * opts.c (handle_option): Check for missing arguments. ada: * misc.c (gnat_handle_option): Don't check for missing arguments. f: * top.c (ffe_handle_option): Don't check for missing arguments. java: * lang.c (java_handle_option): Don't check for missing arguments. testsuite: * const-str-2.m: Update. From-SVN: r68517 --- gcc/opts.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/opts.c') diff --git a/gcc/opts.c b/gcc/opts.c index 2a80595..a5e8297 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -368,6 +368,12 @@ handle_option (char **argv, unsigned int lang_mask) goto done; } + if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE))) + { + error ("missing argument to \"-%s\"", argv[0]); + goto done; + } + /* If the switch takes an integer, convert it. */ if (arg && (option->flags & CL_UINTEGER)) { -- cgit v1.1