aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-05-28 18:28:57 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-05-28 18:28:57 +0100
commit2dec80c756fb7a85f1c6f236386e230d19ccbe26 (patch)
treed1333acc1907350475741ab7bf571e884e00c3e4 /gcc/java
parent7325b1b3abddcaab7ea30a48cd8ceb99ccdabc2e (diff)
downloadgcc-2dec80c756fb7a85f1c6f236386e230d19ccbe26.zip
gcc-2dec80c756fb7a85f1c6f236386e230d19ccbe26.tar.gz
gcc-2dec80c756fb7a85f1c6f236386e230d19ccbe26.tar.bz2
re PR driver/15303 (When gcc sees an unrecognized option, the exit status indicates success)
PR driver/15303 * gcc.c (inform, warning, inform): New functions. (fatal_ice): Rename to internal_error; change cmsgid parameter to gmsgid. All callers changed. (notice): Rename to fnotice; add parameter fp. All callers changed. (fatal_error): Rename to fatal_signal. All users changed. (fatal): Rename to fatal_error; change cmsgid parameter to gmsgid. All callers changed. (process_command): Use warning instead of error for warnings. (end_going_arg): Don't use _() around argument of error. (do_spec_1): Use inform for message from %n specs. Use warning instead of error for warnings. (main): Use inform for comparison messages. Use warning for message about unused linker input. (error): Increment error_count. Print "error: ". * gcc.h (fatal): Change to fatal_error. (warning): Declare. * config/darwin-driver.c (darwin_default_min_version): Use warning instead of fprintf for warnings. * cppspec.c (lang_specific_driver): Use fatal_error instead of fatal. cp: * g++spec.c (lang_specific_driver): Use fatal_error instead of fatal. fortran: * gfortranspec.c (append_arg, lang_specific_driver): Use fatal_error instead of fatal. Use warning instead of fprintf for warnings. java: * jvspec.c (lang_specific_driver): Use fatal_error instead of fatal. Use warning instead of error for warnings. From-SVN: r159986
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/jvspec.c20
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 66b8340..7af9427 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-28 Joseph Myers <joseph@codesourcery.com>
+
+ * jvspec.c (lang_specific_driver): Use fatal_error instead of
+ fatal. Use warning instead of error for warnings.
+
2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
* expr.c (get_symbol_table_index): Add spaces in expression.
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index a021aa4..e197e28 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -1,7 +1,7 @@
/* Specific flags and argument handling of the front-end of the
GNU compiler for the Java(TM) language.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -400,33 +400,33 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
}
if (quote)
- fatal ("argument to '%s' missing\n", quote);
+ fatal_error ("argument to '%s' missing\n", quote);
if (saw_D && ! main_class_name)
- fatal ("can't specify '-D' without '--main'\n");
+ fatal_error ("can't specify '-D' without '--main'\n");
if (main_class_name && ! verify_class_name (main_class_name))
- fatal ("'%s' is not a valid class name", main_class_name);
+ fatal_error ("'%s' is not a valid class name", main_class_name);
num_args = argc + added;
if (saw_resource)
{
if (! saw_o)
- fatal ("--resource requires -o");
+ fatal_error ("--resource requires -o");
}
if (saw_C)
{
num_args += 3;
if (class_files_count + zip_files_count > 0)
{
- error ("warning: already-compiled .class files ignored with -C");
+ warning (0, "already-compiled .class files ignored with -C");
num_args -= class_files_count + zip_files_count;
class_files_count = 0;
zip_files_count = 0;
}
num_args += 2; /* For -o NONE. */
if (saw_o)
- fatal ("cannot specify both -C and -o");
+ fatal_error ("cannot specify both -C and -o");
}
if ((saw_o && java_files_count + class_files_count + zip_files_count > 1)
|| (saw_C && java_files_count > 1)
@@ -438,7 +438,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
{
filelist_filename = make_temp_file ("jx");
if (filelist_filename == NULL)
- fatal ("cannot create temporary file");
+ fatal_error ("cannot create temporary file");
record_temp_file (filelist_filename, ! saw_save_temps, 0);
filelist_file = fopen (filelist_filename, "w");
if (filelist_file == NULL)
@@ -460,7 +460,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
if (combine_inputs || indirect_files_count > 0)
num_args += 1; /* for "-ffilelist-file" */
if (combine_inputs && indirect_files_count > 0)
- fatal("using both @FILE with multiple files not implemented");
+ fatal_error ("using both @FILE with multiple files not implemented");
/* There's no point adding -shared-libgcc if we don't have a shared
libgcc. */
@@ -582,7 +582,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
if (strncmp (argv[i], "-fmain=", 7) == 0)
{
if (! will_link)
- fatal ("cannot specify 'main' class when not linking");
+ fatal_error ("cannot specify 'main' class when not linking");
--j;
continue;
}