* 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
+2003-06-26 Neil Booth <neil@daikokuya.co.uk>
+
+ * 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.
+
2003-06-26 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/power4.md (power4-veccomplex): Correct latency.
+2003-06-26 Neil Booth <neil@daikokuya.co.uk>
+
+ * misc.c (gnat_handle_option): Don't check for missing arguments.
+
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* utils.c (end_subprog_body): Adjust expand_function_end call.
static int
gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED)
{
- const struct cl_option *option = &cl_options[scode];
enum opt_code code = (enum opt_code) scode;
char *q;
int i;
if (code == N_OPTS)
return 1;
- if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
- {
- error ("missing argument to \"-%s\"", option->opt_text);
- return 1;
- }
-
switch (code)
{
default:
/* Number of deferred options scanned for -include. */
static size_t include_cursor;
-static void missing_arg (enum opt_code);
+void missing_arg (enum opt_code);
static void set_Wimplicit (int);
static void print_help (void);
static void handle_OPT_d (const char *);
/* Complain that switch OPT_INDEX expects an argument but none was
provided. */
-static void
+void
missing_arg (enum opt_code code)
{
const char *opt_text = cl_options[code].opt_text;
return 1;
}
- if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
- {
- missing_arg (code);
- return 1;
- }
-
switch (code)
{
default:
+Thu Jun 26 07:06:29 2003 Neil Booth <neil@daikokuya.co.uk>
+
+ * top.c (ffe_handle_option): Don't check for missing arguments.
+
Wed Jun 25 06:52:12 2003 Neil Booth <neil@daikokuya.co.uk>
* top.c (ffe_handle_option): Add missing break;.
int
ffe_handle_option (size_t scode, const char *arg, int value)
{
- const struct cl_option *option = &cl_options[scode];
enum opt_code code = (enum opt_code) scode;
/* Ignore file names. */
if (code == N_OPTS)
return 1;
- if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
- {
- error ("missing argument to \"-%s\"", option->opt_text);
- return 1;
- }
-
switch (code)
{
default:
+2003-06-26 Neil Booth <neil@daikokuya.co.uk>
+
+ * lang.c (java_handle_option): Don't check for missing arguments.
+
2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
* class.c (push_class): Use a location_t to save place.
static int
java_handle_option (size_t scode, const char *arg, int value)
{
- const struct cl_option *option = &cl_options[scode];
enum opt_code code = (enum opt_code) scode;
/* Ignore file names. */
if (code == N_OPTS)
return 1;
- if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
- {
- error ("missing argument to \"-%s\"", option->opt_text);
- return 1;
- }
-
switch (code)
{
default:
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))
{
+2003-06-26 Neil Booth <neil@daikokuya.co.uk>
+
+ * const-str-2.m: Update.
+
2003-06-25 Mark Mitchell <mark@codesourcery.com>
PR c++/10990
/* { dg-do compile } */
/* { dg-options "-fconstant-string-class=" } */
-{ dg-error "no class name specified" "" { target *-*-* } 0 }
+{ dg-error "no class name specified|missing argument" "" { target *-*-* } 0 }
void foo () {}