diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2003-06-26 06:05:36 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2003-06-26 06:05:36 +0000 |
commit | 9eee5e726de1e5d11bc77e0f2ae05c9c0c0916b6 (patch) | |
tree | a9ea757e9e1db36f41e321d59fa201fe81c41dee /gcc | |
parent | 09ec461d3b3e2da96d39bbff6a9de0152a2798a0 (diff) | |
download | gcc-9eee5e726de1e5d11bc77e0f2ae05c9c0c0916b6.zip gcc-9eee5e726de1e5d11bc77e0f2ae05c9c0c0916b6.tar.gz gcc-9eee5e726de1e5d11bc77e0f2ae05c9c0c0916b6.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/misc.c | 7 | ||||
-rw-r--r-- | gcc/c-opts.c | 10 | ||||
-rw-r--r-- | gcc/f/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/f/top.c | 7 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/lang.c | 7 | ||||
-rw-r--r-- | gcc/opts.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/const-str-2.m | 2 |
11 files changed, 31 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba4bde4..a27835d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1fd2a5b..53ca956 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 81bc3d9..4884fe9 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -220,7 +220,6 @@ gnat_parse_file (set_yydebug) 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; @@ -229,12 +228,6 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED) 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: diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 7febbf3..dbe7e90 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -100,7 +100,7 @@ static size_t deferred_count, deferred_size; /* 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 *); @@ -130,7 +130,7 @@ static struct deferred_opt /* 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; @@ -257,12 +257,6 @@ c_common_handle_option (size_t scode, const char *arg, int value) return 1; } - if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE))) - { - missing_arg (code); - return 1; - } - switch (code) { default: diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 8d1b385..e1ac7ac 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,7 @@ +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;. diff --git a/gcc/f/top.c b/gcc/f/top.c index 36cdaa6..359dd2b 100644 --- a/gcc/f/top.c +++ b/gcc/f/top.c @@ -175,19 +175,12 @@ ffe_init_options () 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: diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 8c3aaad..591b230 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/java/lang.c b/gcc/java/lang.c index e389ddc..b8fc498 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -265,19 +265,12 @@ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; 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: @@ -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)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c593d4e..e5f9541 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/gcc/testsuite/objc.dg/const-str-2.m b/gcc/testsuite/objc.dg/const-str-2.m index 779d40a..c406665 100644 --- a/gcc/testsuite/objc.dg/const-str-2.m +++ b/gcc/testsuite/objc.dg/const-str-2.m @@ -2,6 +2,6 @@ /* { 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 () {} |