This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to clean up various diagnostics
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 2 Jul 2005 10:58:05 +0000 (UTC)
- Subject: Patch to clean up various diagnostics
This patch cleans up various cases of ` as a left quote which have
crept back into diagnostics, and some cases of diagnostics ending with
"." or starting with a capital letter (contrary to the GNU Coding
Standards); for consistency the few help texts which end with "." have
the "." removed as well. Various diagnostics ending with "." or
starting with a capital letter remain.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu. OK to
commit?
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
* c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt,
config/rs6000/rs6000.opt, params.def: Remove "." from end of help
texts.
* config/avr/avr.c: Do not use '`' as left quote.
* config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c:
Remove "." from end of diagnostics. Make diagnostics start with
lowercase letter.
cp:
2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
* name-lookup.c, parser.c: Use %q, %< and %> to quote in
diagnostics.
fortran:
2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
* lang.opt: Remove "." from end of help texts.
objc:
2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
* objc-act.c: Use %q to quote in diagnostics.
diff -rupN GCC.orig/gcc/c.opt GCC/gcc/c.opt
--- GCC.orig/gcc/c.opt 2005-06-25 09:53:52.000000000 +0000
+++ GCC/gcc/c.opt 2005-07-01 23:59:04.000000000 +0000
@@ -417,11 +417,11 @@ Give strings the type \"array of char\"
Wpointer-sign
C ObjC Var(warn_pointer_sign) Init(1)
-Warn when a pointer differs in signedness in an assignment.
+Warn when a pointer differs in signedness in an assignment
ansi
C ObjC C++ ObjC++
-A synonym for -std=c89 (for C) or -std=c++98 (for C++).
+A synonym for -std=c89 (for C) or -std=c++98 (for C++)
d
C ObjC C++ ObjC++ Joined
@@ -493,7 +493,7 @@ C ObjC C++ ObjC++ Joined RejectNegative
finput-charset=
C ObjC C++ ObjC++ Joined RejectNegative
--finput-charset=<cset> Specify the default character set for source files.
+-finput-charset=<cset> Specify the default character set for source files
fexternal-templates
@@ -680,7 +680,7 @@ C++ ObjC++
fthreadsafe-statics
C++ ObjC++
--fno-threadsafe-statics Do not generate thread-safe code for initializing local statics.
+-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
funsigned-bitfields
C ObjC C++ ObjC++
@@ -798,7 +798,7 @@ Generate C header of platform-specific f
print-pch-checksum
C ObjC C++ ObjC++
-Print a checksum of the executable for PCH validity checking, and stop.
+Print a checksum of the executable for PCH validity checking, and stop
remap
C ObjC C++ ObjC++
diff -rupN GCC.orig/gcc/common.opt GCC/gcc/common.opt
--- GCC.orig/gcc/common.opt 2005-06-28 21:46:37.000000000 +0000
+++ GCC/gcc/common.opt 2005-07-01 23:59:51.000000000 +0000
@@ -345,7 +345,7 @@ Common Joined RejectNegative
fdiagnostics-show-option
Common
-Amend appropriate diagnostic messages with the command line option that controls them.
+Amend appropriate diagnostic messages with the command line option that controls them
fdump-
Common Joined RejectNegative
@@ -433,7 +433,7 @@ elimination
fgcse-after-reload
Common Report Var(flag_gcse_after_reload)
Perform global common subexpression elimination after register allocation
-has finished.
+has finished
fguess-branch-probability
Common Report Var(flag_guess_branch_prob)
@@ -552,15 +552,15 @@ Move loop invariant computations out of
fmudflap
Common RejectNegative Report Var(flag_mudflap)
-Add mudflap bounds-checking instrumentation for single-threaded program.
+Add mudflap bounds-checking instrumentation for single-threaded program
fmudflapth
Common RejectNegative Report Var(flag_mudflap_threads)
-Add mudflap bounds-checking instrumentation for multi-threaded program.
+Add mudflap bounds-checking instrumentation for multi-threaded program
fmudflapir
Common RejectNegative Report Var(flag_mudflap_ignore_reads)
-Ignore read operations when inserting mudflap instrumentation.
+Ignore read operations when inserting mudflap instrumentation
freschedule-modulo-scheduled-loops
Common Report Var(flag_resched_modulo_sched)
@@ -753,7 +753,7 @@ Mark data as shared rather than private
fshow-column
Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(1)
-Show column numbers in diagnostics, when available. Default on.
+Show column numbers in diagnostics, when available. Default on
fsignaling-nans
Common Report Var(flag_signaling_nans)
@@ -769,11 +769,11 @@ Use value profiling for speculative pref
fsplit-ivs-in-unroller
Common Report Var(flag_split_ivs_in_unroller) Init(1)
-Split lifetimes of induction variables when loops are unrolled.
+Split lifetimes of induction variables when loops are unrolled
fvariable-expansion-in-unroller
Common Report Var(flag_variable_expansion_in_unroller)
-Apply variable expansion when loops are unrolled.
+Apply variable expansion when loops are unrolled
; Emit code to probe the stack, to help detect stack overflow; also
; may cause large objects to be allocated dynamically.
@@ -869,7 +869,7 @@ Coalesce memory temporaries in the SSA->
ftree-copyrename
Common Report Var(flag_tree_copyrename)
-Replace SSA temporaries with better names in copies.
+Replace SSA temporaries with better names in copies
ftree-copy-prop
Common Report Var(flag_tree_copy_prop)
@@ -933,7 +933,7 @@ Replace temporary expressions in the SSA
ftree-lrs
Common Report Var(flag_tree_live_range_split)
-Perform live range splitting during the SSA->normal pass.
+Perform live range splitting during the SSA->normal pass
ftree-vrp
Common Report Var(flag_tree_vrp) Init(0)
diff -rupN GCC.orig/gcc/config/avr/avr.c GCC/gcc/config/avr/avr.c
--- GCC.orig/gcc/config/avr/avr.c 2005-06-25 09:54:20.000000000 +0000
+++ GCC/gcc/config/avr/avr.c 2005-07-02 00:04:46.000000000 +0000
@@ -269,7 +269,7 @@ avr_override_options (void)
if (!t->name)
{
- fprintf (stderr, "unknown MCU `%s' specified\nKnown MCU names:\n",
+ fprintf (stderr, "unknown MCU '%s' specified\nKnown MCU names:\n",
avr_mcu_name);
for (t = avr_mcu_types; t->name; t++)
fprintf (stderr," %s\n", t->name);
@@ -4684,7 +4684,7 @@ avr_handle_fndecl_attribute (tree *node,
{
if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
{
- warning (0, "`%s' appears to be a misspelled interrupt handler",
+ warning (0, "%qs appears to be a misspelled interrupt handler",
func_name);
}
}
@@ -4692,7 +4692,7 @@ avr_handle_fndecl_attribute (tree *node,
{
if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
{
- warning (0, "`%s' appears to be a misspelled signal handler",
+ warning (0, "%qs appears to be a misspelled signal handler",
func_name);
}
}
diff -rupN GCC.orig/gcc/config/bfin/bfin.opt GCC/gcc/config/bfin/bfin.opt
--- GCC.orig/gcc/config/bfin/bfin.opt 2005-06-25 09:54:21.000000000 +0000
+++ GCC/gcc/config/bfin/bfin.opt 2005-07-02 00:04:59.000000000 +0000
@@ -25,7 +25,7 @@ Omit frame pointer for leaf functions
mlow64k
Target Report Mask(LOW_64K)
-Program is entirely located in low 64k of memory.
+Program is entirely located in low 64k of memory
mcsync
Target Report Mask(CSYNC)
diff -rupN GCC.orig/gcc/config/pa/pa.opt GCC/gcc/config/pa/pa.opt
--- GCC.orig/gcc/config/pa/pa.opt 2005-06-25 09:54:35.000000000 +0000
+++ GCC/gcc/config/pa/pa.opt 2005-07-02 00:05:41.000000000 +0000
@@ -49,7 +49,7 @@ Generate fast indirect calls
mfixed-range=
Target RejectNegative Joined
-Specify range of registers to make fixed.
+Specify range of registers to make fixed
mgas
Target Report Mask(GAS)
@@ -98,7 +98,7 @@ Use portable calling conventions
mschedule=
Target RejectNegative Joined
-Specify CPU for scheduling purposes. Valid arguments are 700, 7100, 7100LC, 7200, 7300, and 8000.
+Specify CPU for scheduling purposes. Valid arguments are 700, 7100, 7100LC, 7200, 7300, and 8000
msoft-float
Target Report Mask(SOFT_FLOAT)
diff -rupN GCC.orig/gcc/config/rs6000/rs6000.c GCC/gcc/config/rs6000/rs6000.c
--- GCC.orig/gcc/config/rs6000/rs6000.c 2005-07-01 19:25:42.000000000 +0000
+++ GCC/gcc/config/rs6000/rs6000.c 2005-07-02 00:06:25.000000000 +0000
@@ -4051,9 +4051,9 @@ init_cumulative_args (CUMULATIVE_ARGS *c
&& TARGET_ALTIVEC_ABI
&& ALTIVEC_VECTOR_MODE (TYPE_MODE (TREE_TYPE (fntype))))
{
- error ("Cannot return value in vector register because"
+ error ("cannot return value in vector register because"
" altivec instructions are disabled, use -maltivec"
- " to enable them.");
+ " to enable them");
}
}
@@ -4297,9 +4297,9 @@ function_arg_advance (CUMULATIVE_ARGS *c
{
cum->vregno++;
if (!TARGET_ALTIVEC)
- error ("Cannot pass argument in vector register because"
+ error ("cannot pass argument in vector register because"
" altivec instructions are disabled, use -maltivec"
- " to enable them.");
+ " to enable them");
/* PowerPC64 Linux and AIX allocate GPRs for a vector argument
even if it is going to be passed in a vector register.
diff -rupN GCC.orig/gcc/config/rs6000/rs6000.opt GCC/gcc/config/rs6000/rs6000.opt
--- GCC.orig/gcc/config/rs6000/rs6000.opt 2005-06-25 09:54:38.000000000 +0000
+++ GCC/gcc/config/rs6000/rs6000.opt 2005-07-02 00:05:57.000000000 +0000
@@ -164,7 +164,7 @@ Generate VRSAVE instructions when genera
mvrsave=
Target RejectNegative Joined
--mvrsave=yes/no Deprecated option. Use -mvrsave/-mno-vrsave instead.
+-mvrsave=yes/no Deprecated option. Use -mvrsave/-mno-vrsave instead
misel
Target Var(rs6000_isel)
@@ -212,7 +212,7 @@ Warn about deprecated 'vector long ...'
mfloat-gprs=
Target RejectNegative Joined
--mfloat-gprs= Select GPR floating point method.
+-mfloat-gprs= Select GPR floating point method
mlong-double-
Target RejectNegative Joined UInteger
diff -rupN GCC.orig/gcc/config/s390/s390.c GCC/gcc/config/s390/s390.c
--- GCC.orig/gcc/config/s390/s390.c 2005-06-29 22:09:19.000000000 +0000
+++ GCC/gcc/config/s390/s390.c 2005-07-02 00:06:53.000000000 +0000
@@ -1212,9 +1212,9 @@ override_options (void)
/* Sanity checks. */
if (TARGET_ZARCH && !(s390_arch_flags & PF_ZARCH))
- error ("z/Architecture mode not supported on %s.", s390_arch_string);
+ error ("z/Architecture mode not supported on %s", s390_arch_string);
if (TARGET_64BIT && !TARGET_ZARCH)
- error ("64-bit ABI not supported in ESA/390 mode.");
+ error ("64-bit ABI not supported in ESA/390 mode");
/* Set processor cost function. */
@@ -1226,7 +1226,7 @@ override_options (void)
if (TARGET_BACKCHAIN && TARGET_PACKED_STACK && TARGET_HARD_FLOAT)
error ("-mbackchain -mpacked-stack -mhard-float are not supported "
- "in combination.");
+ "in combination");
if (s390_stack_size)
{
@@ -3781,7 +3781,7 @@ print_operand_address (FILE *file, rtx a
if (!s390_decompose_address (addr, &ad)
|| (ad.base && !REG_OK_FOR_BASE_STRICT_P (ad.base))
|| (ad.indx && !REG_OK_FOR_INDEX_STRICT_P (ad.indx)))
- output_operand_lossage ("Cannot decompose address.");
+ output_operand_lossage ("cannot decompose address");
if (ad.disp)
output_addr_const (file, ad.disp);
@@ -5801,7 +5801,7 @@ s390_frame_info (void)
cfun_frame_layout.frame_size = get_frame_size ();
if (!TARGET_64BIT && cfun_frame_layout.frame_size > 0x7fff0000)
- fatal_error ("Total size of local variables exceeds architecture limit.");
+ fatal_error ("total size of local variables exceeds architecture limit");
if (!TARGET_PACKED_STACK)
{
diff -rupN GCC.orig/gcc/cp/name-lookup.c GCC/gcc/cp/name-lookup.c
--- GCC.orig/gcc/cp/name-lookup.c 2005-07-01 21:59:37.000000000 +0000
+++ GCC/gcc/cp/name-lookup.c 2005-07-02 00:02:37.000000000 +0000
@@ -2825,7 +2825,7 @@ set_decl_namespace (tree decl, tree scop
if (scope == current_namespace)
{
if (at_namespace_scope_p ())
- error ("explicit qualification in declaration of `%D'",
+ error ("explicit qualification in declaration of %qD",
decl);
return;
}
diff -rupN GCC.orig/gcc/cp/parser.c GCC/gcc/cp/parser.c
--- GCC.orig/gcc/cp/parser.c 2005-07-01 21:59:37.000000000 +0000
+++ GCC/gcc/cp/parser.c 2005-07-02 00:04:17.000000000 +0000
@@ -16290,7 +16290,7 @@ cp_parser_objc_expression (cp_parser* pa
break;
}
default:
- error ("misplaced `@%D' Objective-C++ construct", kwd->value);
+ error ("misplaced %<@%D%> Objective-C++ construct", kwd->value);
cp_parser_skip_to_end_of_block_or_statement (parser);
}
@@ -16431,7 +16431,7 @@ cp_parser_objc_encode_expression (cp_par
if (!type)
{
- error ("`@encode' must specify a type as an argument");
+ error ("%<@encode%> must specify a type as an argument");
return error_mark_node;
}
@@ -17057,7 +17057,7 @@ cp_parser_objc_protocol_declaration (cp_
cp_lexer_consume_token (parser->lexer); /* Eat '@protocol'. */
if (cp_lexer_next_token_is_not (parser->lexer, CPP_NAME))
{
- error ("identifier expected after `@protocol'");
+ error ("identifier expected after %<@protocol%>");
goto finish;
}
@@ -17193,7 +17193,7 @@ cp_parser_objc_declaration (cp_parser* p
cp_parser_objc_end_implementation (parser);
break;
default:
- error ("misplaced `@%D' Objective-C++ construct", kwd->value);
+ error ("misplaced %<@%D%> Objective-C++ construct", kwd->value);
cp_parser_skip_to_end_of_block_or_statement (parser);
}
}
@@ -17324,7 +17324,7 @@ cp_parser_objc_statement (cp_parser * pa
case RID_AT_THROW:
return cp_parser_objc_throw_statement (parser);
default:
- error ("misplaced `@%D' Objective-C++ construct", kwd->value);
+ error ("misplaced %<@%D%> Objective-C++ construct", kwd->value);
cp_parser_skip_to_end_of_block_or_statement (parser);
}
diff -rupN GCC.orig/gcc/fortran/lang.opt GCC/gcc/fortran/lang.opt
--- GCC.orig/gcc/fortran/lang.opt 2005-06-25 09:54:48.000000000 +0000
+++ GCC/gcc/fortran/lang.opt 2005-07-02 00:02:16.000000000 +0000
@@ -91,11 +91,11 @@ Specify that backslash in string introdu
fdump-parse-tree
F95
-Display the code tree after parsing.
+Display the code tree after parsing
ff2c
F95
-Use f2c calling convention.
+Use f2c calling convention
ffixed-form
F95
@@ -127,7 +127,7 @@ F95 RejectNegative Joined UInteger
fmax-identifier-length=
F95 RejectNegative Joined UInteger
--fmax-identifier-length=<n> Maximum identifier length.
+-fmax-identifier-length=<n> Maximum identifier length
fmax-stack-var-size=
F95 RejectNegative Joined UInteger
@@ -155,18 +155,18 @@ F95 RejectNegative Joined UInteger
std=f95
F95
-Conform to the ISO Fortran 95 standard.
+Conform to the ISO Fortran 95 standard
std=f2003
F95
-Conform to the ISO Fortran 2003 standard.
+Conform to the ISO Fortran 2003 standard
std=gnu
F95
-Conform nothing in particular.
+Conform nothing in particular
std=legacy
F95
-Accept extensions to support legacy code.
+Accept extensions to support legacy code
; This comment is to ensure we retain the blank line above.
diff -rupN GCC.orig/gcc/objc/objc-act.c GCC/gcc/objc/objc-act.c
--- GCC.orig/gcc/objc/objc-act.c 2005-07-01 22:19:10.000000000 +0000
+++ GCC/gcc/objc/objc-act.c 2005-07-02 00:01:54.000000000 +0000
@@ -7074,13 +7074,13 @@ add_instance_variable (tree class, int p
if (TYPE_NEEDS_CONSTRUCTING (field_type)
&& !TYPE_HAS_DEFAULT_CONSTRUCTOR (field_type))
{
- warning (0, "type `%s' has no default constructor to call",
+ warning (0, "type %qs has no default constructor to call",
type_name);
/* If we cannot call a constructor, we should also avoid
calling the destructor, for symmetry. */
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (field_type))
- warning (0, "destructor for `%s' shall not be run either",
+ warning (0, "destructor for %qs shall not be run either",
type_name);
}
}
@@ -7092,9 +7092,9 @@ add_instance_variable (tree class, int p
{
/* Vtable pointers are Real Bad(tm), since Obj-C cannot
initialize them. */
- error ("type `%s' has virtual member functions", type_name);
- error ("illegal aggregate type `%s' specified "
- "for instance variable `%s'",
+ error ("type %qs has virtual member functions", type_name);
+ error ("illegal aggregate type %qs specified "
+ "for instance variable %qs",
type_name, ivar_name);
/* Return class as is without adding this ivar. */
return class;
@@ -7103,9 +7103,9 @@ add_instance_variable (tree class, int p
/* User-defined constructors and destructors are not known to Obj-C
and hence will not be called. This may or may not be a problem. */
if (TYPE_NEEDS_CONSTRUCTING (field_type))
- warning (0, "type `%s' has a user-defined constructor", type_name);
+ warning (0, "type %qs has a user-defined constructor", type_name);
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (field_type))
- warning (0, "type `%s' has a user-defined destructor", type_name);
+ warning (0, "type %qs has a user-defined destructor", type_name);
if (!warn_cxx_ivars)
{
diff -rupN GCC.orig/gcc/opts.c GCC/gcc/opts.c
--- GCC.orig/gcc/opts.c 2005-06-28 21:46:39.000000000 +0000
+++ GCC/gcc/opts.c 2005-07-02 00:00:07.000000000 +0000
@@ -687,7 +687,7 @@ decode_options (unsigned int argc, const
&& !targetm.have_named_sections)
{
inform
- ("-freorder-blocks-and-partition does not work on this architecture.");
+ ("-freorder-blocks-and-partition does not work on this architecture");
flag_reorder_blocks_and_partition = 0;
flag_reorder_blocks = 1;
}
diff -rupN GCC.orig/gcc/params.def GCC/gcc/params.def
--- GCC.orig/gcc/params.def 2005-06-28 21:46:39.000000000 +0000
+++ GCC/gcc/params.def 2005-07-02 00:00:51.000000000 +0000
@@ -188,14 +188,14 @@ DEFPARAM(PARAM_MAX_GCSE_PASSES,
(Added loads execution count) */
DEFPARAM(PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
"gcse-after-reload-partial-fraction",
- "The threshold ratio for performing partial redundancy elimination after reload.",
+ "The threshold ratio for performing partial redundancy elimination after reload",
3, 0, 0)
/* This is the threshold ratio of the critical edges execution count compared to
the redundant loads execution count that permits performing the load
redundancy elimination in gcse after reload. */
DEFPARAM(PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION,
"gcse-after-reload-critical-fraction",
- "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload.",
+ "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload",
10, 0, 0)
/* This parameter limits the number of insns in a loop that will be unrolled,
and by how much the loop is unrolled.
@@ -417,7 +417,7 @@ DEFPARAM(PARAM_MAX_RELOAD_SEARCH_INSNS,
DEFPARAM(PARAM_MAX_ALIASED_VOPS,
"max-aliased-vops",
- "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping.",
+ "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping",
500, 0, 0)
DEFPARAM(PARAM_MAX_SCHED_REGION_BLOCKS,
diff -rupN GCC.orig/gcc/tree.c GCC/gcc/tree.c
--- GCC.orig/gcc/tree.c 2005-07-01 22:12:35.000000000 +0000
+++ GCC/gcc/tree.c 2005-07-02 00:00:23.000000000 +0000
@@ -3368,7 +3368,7 @@ handle_dll_attribute (tree * pnode, tree
if (TREE_CODE (node) == FUNCTION_DECL && DECL_INITIAL (node)
&& !DECL_DECLARED_INLINE_P (node))
{
- error ("function %q+D definition is marked dllimport.", node);
+ error ("function %q+D definition is marked dllimport", node);
*no_add_attrs = true;
}
@@ -3376,7 +3376,7 @@ handle_dll_attribute (tree * pnode, tree
{
if (DECL_INITIAL (node))
{
- error ("variable %q+D definition is marked dllimport.",
+ error ("variable %q+D definition is marked dllimport",
node);
*no_add_attrs = true;
}
@@ -3397,7 +3397,7 @@ handle_dll_attribute (tree * pnode, tree
|| TREE_CODE (node) == FUNCTION_DECL))
{
error ("external linkage required for symbol %q+D because of "
- "%qs attribute.", node, IDENTIFIER_POINTER (name));
+ "%qs attribute", node, IDENTIFIER_POINTER (name));
*no_add_attrs = true;
}