aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-09-02 12:41:22 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-09-02 12:41:22 +0100
commit5de8299cec99d5a056149ce23d09d3db5cbf0116 (patch)
tree963a2e047cab0d224c64b2b3500d48fa1fd9039f /gcc/java
parentf7e4c09b548c7220ac3277b46478bb40438f4a44 (diff)
downloadgcc-5de8299cec99d5a056149ce23d09d3db5cbf0116.zip
gcc-5de8299cec99d5a056149ce23d09d3db5cbf0116.tar.gz
gcc-5de8299cec99d5a056149ce23d09d3db5cbf0116.tar.bz2
re PR driver/44076 (-MT <target> behaves different as -MT<target> (w/o space))
PR driver/44076 * opts.h (struct cl_option): Add alias_arg, neg_alias_arg and alias_target fields. * opt-functions.awk (opt_sanitized_name): Don't handle finline-limit=, Wlarger-than= and ftemplate-depth= specially. * optc-gen.awk: Generate alias fields. * opth-gen.awk: Explicitly give values for OPT_* enum constants. Don't generate such constants for aliases. * opts-common.c (generate_canonical_option): New. (decode_cmdline_option): Handle aliases. Use generate_canonical_option for known options instead of copying the input option text. * doc/options.texi (Alias): Document. * common.opt (W, Wlarger-than-, aux-info=, finline-limit-, fstack-check, specs): Mark as aliases. * gcc.c (driver_handle_option): Canonicalize -L options to joined arguments. (driver_handle_option): Don't handle OPT_specs. * opts.c (common_handle_option): Don't handle options marked as aliases. (enable_warning_as_error): Handle aliases. * stor-layout.c (layout_decl): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. * tree-optimize.c (tree_rest_of_compilation): Use OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq. c-family: * c.opt (Wcomments, Werror-implicit-function-declaration, ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x, std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as aliases. * c-common.c (option_codes): Use OPT_Wcomment instead of OPT_Wcomments. * c-opts.c (warning_as_error_callback, c_common_handle_option): Don't handle options marked as aliases. java: * lang.opt (CLASSPATH, bootclasspath, classpath, encoding, fCLASSPATH=): Mark as Java options and as aliases. * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*. (lang_specific_driver): Don't handle options marked as aliases. * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_. testsuite: * gcc.dg/cpp/warn-comments-3.c: New. Based on warn-comments-2.c but using -Werror=comment. * gcc.dg/cpp/warn-comments.c, gcc.dg/cpp/warn-comments-2.c: Adjust expected error messages. From-SVN: r163770
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog8
-rw-r--r--gcc/java/jvspec.c17
-rw-r--r--gcc/java/lang.c1
-rw-r--r--gcc/java/lang.opt10
4 files changed, 16 insertions, 20 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index ca9a8d2..f6022e0 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,11 @@
+2010-09-02 Joseph Myers <joseph@codesourcery.com>
+
+ * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
+ fCLASSPATH=): Mark as Java options and as aliases.
+ * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
+ (lang_specific_driver): Don't handle options marked as aliases.
+ * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
+
2010-08-22 Joseph Myers <joseph@codesourcery.com>
* Make-lang.in (jvspec.o): Update dependencies.
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index cb8c146..792dda0 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -69,7 +69,7 @@ static const char jvgenmain_spec[] =
%<fuse-boehm-gc %<fhash-synchronization %<fjni\
%<findirect-dispatch %<fnew-verifier\
%<fno-store-check %<foutput-class-dir\
- %<fclasspath* %<fCLASSPATH* %<fbootclasspath*\
+ %<fclasspath* %<fbootclasspath*\
%<fextdirs*\
%<fuse-divide-subroutine %<fno-use-divide-subroutine\
%<fuse-atomic-builtins %<fno-use-atomic-builtins\
@@ -299,10 +299,8 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
saw_o = 1;
break;
- case OPT_classpath:
- case OPT_bootclasspath:
- case OPT_CLASSPATH:
- case OPT_encoding:
+ case OPT_fclasspath_:
+ case OPT_fbootclasspath_:
case OPT_extdirs:
added -= 1;
break;
@@ -514,15 +512,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
--j;
continue;
- case OPT_classpath:
- case OPT_CLASSPATH:
- case OPT_fCLASSPATH_:
case OPT_fclasspath_:
jcf_path_classpath_arg (decoded_options[i].arg);
--j;
continue;
- case OPT_bootclasspath:
case OPT_fbootclasspath_:
jcf_path_bootclasspath_arg (decoded_options[i].arg);
--j;
@@ -533,11 +527,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
--j;
continue;
- case OPT_encoding:
- generate_option (OPT_fencoding_, decoded_options[i].arg, 1,
- CL_DRIVER, &new_decoded_options[j]);
- continue;
-
case OPT_L:
if (spec_file == NULL)
spec_file = find_spec_file (decoded_options[i].arg);
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 06edd5e..1633c02 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -261,7 +261,6 @@ java_handle_option (size_t scode, const char *arg, int value,
case OPT_faux_classpath:
case OPT_fclasspath_:
- case OPT_fCLASSPATH_:
jcf_path_classpath_arg (arg);
break;
diff --git a/gcc/java/lang.opt b/gcc/java/lang.opt
index 3d6e902..af1dff1 100644
--- a/gcc/java/lang.opt
+++ b/gcc/java/lang.opt
@@ -29,7 +29,7 @@ Driver
; Java driver option in fact distinct from C-family option with the same name.
CLASSPATH
-Driver Separate
+Java Separate Alias(fclasspath=)
D
Driver Joined Separate
@@ -88,19 +88,19 @@ Java Var(flag_redundant)
Warn if modifiers are specified when not necessary
bootclasspath
-Driver Separate
+Java Separate Alias(fbootclasspath=)
classpath
-Driver Separate
+Java Separate Alias(fclasspath=)
encoding
-Driver Separate
+Java Separate Alias(fencoding=)
extdirs
Driver Separate
fCLASSPATH=
-Java JoinedOrMissing RejectNegative
+Java JoinedOrMissing RejectNegative Alias(fclasspath=)
--CLASSPATH Deprecated; use --classpath instead
faux-classpath