This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Remove periods at end of diagnostics
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 1 Dec 2001 15:31:59 +0000
- Subject: Remove periods at end of diagnostics
I believe it's a GNU coding standard; certainly a GCC one anyway.
There are a couple of places where the diagnostic is multi-sentence or
otherwise quite long; I've left those with trailing periods.
I guess I'll commit this as obvious. Bootstrapped all apart from Ada.
I noticed Java starts diagnostics with a capital letter. I'll leave
the Java people to correct that should they deem it appropriate.
Neil.
* c-decl.c (duplicate_decls, parmlist_tags_warning): Remove
trailing period from diagnostics.
* c-lex.c (cb_file_change): Similarly.
* cppmacro.c (check_trad_stringification): Similarly.
* gcc.c (do_spec_1): Similarly.
* genattr.c (main): Similarly.
* genattrtab.c (main, operate_exp, make_length_attrs): Similarly.
* gencodes.c (main): Similarly.
* genconfig.c (main): Similarly.
* genconstants.c (main): Similarly.
* genemit.c (main): Similarly.
* genextract.c (main): Similarly.
* genopinit.c (main): Similarly.
* genoutput.c (main): Similarly.
* genpeep.c (main): Similarly.
* genrecog.c (main): Similarly.
* mips-tfile.c (add_file, error): Similarly.
* profile.c (init_branch_prob): Similarly.
* reload1.c (spill_failure): Similarly.
* stmt.c (parse_output_constraint): Similarly.
* varasm.c (assemble_variable): Similarly.
cp:
* class.c (finish_struct): Similarly.
* decl.c (check_tag_decl): Similarly.
* lex.c (cxx_set_yydebug): Similarly.
* typeck2.c (friendly_abort): Similarly.
java:
* expr.c (expand_byte_code): Similarly.
* jcf-parse.c (load_class, jcf_parse): Similarly.
* jcf-write.c (generate_classfile): Similarly.
* lex.c (java_lex): Similarly.
objc:
* objc-act.c (finish_message_expr, check_duplicates,
add_class_method, add_instance_method): Similarly.
============================================================
Index: gcc/c-decl.c
--- gcc/c-decl.c 2001/11/30 21:53:44 1.272
+++ gcc/c-decl.c 2001/12/01 12:34:21
@@ -1621,13 +1621,13 @@ duplicate_decls (newdecl, olddecl, diffe
if (TREE_CHAIN (t) == 0
&& TYPE_MAIN_VARIANT (type) != void_type_node)
{
- error ("A parameter list with an ellipsis can't match an empty parameter name list declaration.");
+ error ("A parameter list with an ellipsis can't match an empty parameter name list declaration");
break;
}
if (simple_type_promotes_to (type) != NULL_TREE)
{
- error ("An argument type that has a default promotion can't match an empty parameter name list declaration.");
+ error ("An argument type that has a default promotion can't match an empty parameter name list declaration");
break;
}
}
@@ -5300,8 +5300,8 @@ parmlist_tags_warning ()
}
if (! already)
{
- warning ("its scope is only this definition or declaration, which is probably not what you want.");
+ warning ("its scope is only this definition or declaration, which is probably not what you want");
already = 1;
}
}
============================================================
Index: gcc/c-lex.c
--- gcc/c-lex.c 2001/11/29 22:40:55 1.156
+++ gcc/c-lex.c 2001/12/01 12:34:33
@@ -297,8 +297,8 @@ cb_file_change (pfile, new_map)
{
warning_with_file_and_line
(input_filename, lineno,
- "This file contains more '%c's than '%c's.",
+ "This file contains more '%c's than '%c's",
indent_level > input_file_stack->indent_level ? '{' : '}',
indent_level > input_file_stack->indent_level ? '}' : '{');
}
============================================================
Index: gcc/cppmacro.c
--- gcc/cppmacro.c 2001/11/26 23:44:50 1.87
+++ gcc/cppmacro.c 2001/12/01 12:34:56
@@ -1480,7 +1480,7 @@ check_trad_stringification (pfile, macro
&& !memcmp (p, NODE_NAME (node), len))
{
cpp_warning (pfile,
- "macro argument \"%s\" would be stringified with -traditional.",
+ "macro argument \"%s\" would be stringified with -traditional",
NODE_NAME (node));
break;
}
============================================================
Index: gcc/gcc.c
--- gcc/gcc.c 2001/11/29 22:39:10 1.269
+++ gcc/gcc.c 2001/12/01 12:35:30
@@ -4255,7 +4255,7 @@ do_spec_1 (spec, inswitch, soft_matched_
switch (c = *p++)
{
case 0:
- fatal ("Invalid specification! Bug in cc.");
+ fatal ("Invalid specification! Bug in cc");
case 'b':
obstack_grow (&obstack, input_basename, basename_length);
============================================================
Index: gcc/genattr.c
--- gcc/genattr.c 2001/11/14 20:17:05 1.46
+++ gcc/genattr.c 2001/12/01 12:35:30
@@ -208,7 +208,7 @@ main (argc, argv)
progname = "genattr";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
@@ -297,7 +297,7 @@ main (argc, argv)
}
else if (unit->multiplicity != multiplicity
|| unit->simultaneity != simultaneity)
- fatal ("Differing specifications given for `%s' function unit.",
+ fatal ("Differing specifications given for `%s' function unit",
unit->name);
extend_range (&unit->ready_cost, ready_cost, ready_cost);
============================================================
Index: gcc/genattrtab.c
--- gcc/genattrtab.c 2001/11/30 01:55:24 1.106
+++ gcc/genattrtab.c 2001/12/01 12:35:54
@@ -1438,7 +1438,7 @@ make_canonical (attr, exp)
if (! strcmp (XSTR (exp, 0), "*"))
{
if (attr == 0 || attr->default_val == 0)
- fatal ("(attr_value \"*\") used in invalid context.");
+ fatal ("(attr_value \"*\") used in invalid context");
exp = attr->default_val->value;
}
@@ -1827,7 +1827,7 @@ operate_exp (op, left, right)
}
else
- fatal ("Badly formed attribute value.");
+ fatal ("Badly formed attribute value");
/* NOTREACHED */
return NULL;
}
@@ -2454,7 +2454,7 @@ make_length_attrs ()
return;
if (! length_attr->is_numeric)
- fatal ("length attribute must be numeric.");
+ fatal ("length attribute must be numeric");
length_attr->is_const = 0;
length_attr->is_special = 1;
@@ -6065,7 +6065,7 @@ main (argc, argv)
progname = "genattrtab";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/gencodes.c
--- gcc/gencodes.c 2001/11/14 20:17:06 1.43
+++ gcc/gencodes.c 2001/12/01 12:35:58
@@ -54,7 +54,7 @@ main (argc, argv)
progname = "gencodes";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genconfig.c
--- gcc/genconfig.c 2001/11/14 20:17:06 1.44
+++ gcc/genconfig.c 2001/12/01 12:35:58
@@ -275,7 +275,7 @@ main (argc, argv)
progname = "genconfig";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genconstants.c
--- gcc/genconstants.c 2001/08/23 10:21:42 1.2
+++ gcc/genconstants.c 2001/12/01 12:35:58
@@ -61,7 +61,7 @@ main (argc, argv)
progname = "genconstants";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader (argv[1]) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genemit.c
--- gcc/genemit.c 2001/11/14 20:17:06 1.68
+++ gcc/genemit.c 2001/12/01 12:36:00
@@ -787,7 +787,7 @@ main (argc, argv)
progname = "genemit";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genextract.c
--- gcc/genextract.c 2001/11/24 22:57:28 1.48
+++ gcc/genextract.c 2001/12/01 12:36:02
@@ -360,7 +360,7 @@ main (argc, argv)
progname = "genextract";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genflags.c
--- gcc/genflags.c 2001/11/14 20:17:06 1.40
+++ gcc/genflags.c 2001/12/01 12:36:02
@@ -228,7 +228,7 @@ main (argc, argv)
obstack_init (&obstack);
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genopinit.c
--- gcc/genopinit.c 2001/11/30 05:13:17 1.50
+++ gcc/genopinit.c 2001/12/01 12:36:03
@@ -317,7 +317,7 @@ main (argc, argv)
progname = "genopinit";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genoutput.c
--- gcc/genoutput.c 2001/11/14 20:17:07 1.66
+++ gcc/genoutput.c 2001/12/01 12:36:05
@@ -951,7 +951,7 @@ main (argc, argv)
progname = "genoutput";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genpeep.c
--- gcc/genpeep.c 2001/11/14 20:17:07 1.50
+++ gcc/genpeep.c 2001/12/01 12:36:06
@@ -383,7 +383,7 @@ main (argc, argv)
progname = "genpeep";
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/genrecog.c
--- gcc/genrecog.c 2001/11/23 02:05:18 1.113
+++ gcc/genrecog.c 2001/12/01 12:36:12
@@ -2687,7 +2687,7 @@ main (argc, argv)
memset (&peephole2_tree, 0, sizeof peephole2_tree);
if (argc <= 1)
- fatal ("No input file name.");
+ fatal ("No input file name");
if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
return (FATAL_EXIT_CODE);
============================================================
Index: gcc/mips-tfile.c
--- gcc/mips-tfile.c 2001/10/21 21:32:00 1.43
+++ gcc/mips-tfile.c 2001/12/01 12:36:23
@@ -2526,7 +2526,7 @@ add_file (file_start, file_end_p1)
(shash_t **) 0);
if (file_end_p1 - file_start > (long) PAGE_USIZE-2)
- fatal ("Filename goes over one page boundary.");
+ fatal ("Filename goes over one page boundary");
/* Push the start of the filename. We assume that the filename
will be stored at string offset 1. */
@@ -5608,7 +5608,7 @@ error VPARAMS ((const char *format, ...)
void
fancy_abort ()
{
- fatal ("Internal abort.");
+ fatal ("Internal abort");
}
============================================================
Index: gcc/profile.c
--- gcc/profile.c 2001/11/21 11:47:02 1.78
+++ gcc/profile.c 2001/12/01 12:36:27
@@ -972,7 +972,7 @@ init_branch_prob (filename)
strip_off_ending (da_file_name, len);
strcat (da_file_name, ".da");
if ((da_file = fopen (da_file_name, "rb")) == 0)
- warning ("file %s not found, execution counts assumed to be zero.",
+ warning ("file %s not found, execution counts assumed to be zero",
da_file_name);
/* The first word in the .da file gives the number of instrumented
============================================================
Index: gcc/reload1.c
--- gcc/reload1.c 2001/11/21 00:04:47 1.312
+++ gcc/reload1.c 2001/12/01 12:36:57
@@ -1888,11 +1888,11 @@ spill_failure (insn, class)
{
static const char *const reg_class_names[] = REG_CLASS_NAMES;
if (asm_noperands (PATTERN (insn)) >= 0)
- error_for_asm (insn, "Can't find a register in class `%s' while reloading `asm'.",
+ error_for_asm (insn, "Can't find a register in class `%s' while reloading `asm'",
reg_class_names[class]);
else
{
- error ("Unable to find a register to spill in class `%s'.",
+ error ("Unable to find a register to spill in class `%s'",
reg_class_names[class]);
fatal_insn ("This is the insn:", insn);
}
============================================================
Index: gcc/stmt.c
--- gcc/stmt.c 2001/11/27 14:31:16 1.231
+++ gcc/stmt.c 2001/12/01 12:37:17
@@ -1390,7 +1390,7 @@ parse_output_constraint (constraint_p,
{
case '+':
case '=':
- error ("operand constraint contains '+' or '=' at illegal position.");
+ error ("operand constraint contains incorrectly positioned '+' or '='");
return false;
case '%':
============================================================
Index: gcc/varasm.c
--- gcc/varasm.c 2001/11/28 10:16:40 1.232
+++ gcc/varasm.c 2001/12/01 12:37:31
@@ -1597,7 +1597,7 @@ assemble_variable (decl, top_level, at_e
if (align > MAX_OFILE_ALIGNMENT)
{
warning_with_decl (decl,
- "alignment of `%s' is greater than maximum object file alignment. Using %d.",
+ "alignment of `%s' is greater than maximum object file alignment. Using %d",
MAX_OFILE_ALIGNMENT/BITS_PER_UNIT);
align = MAX_OFILE_ALIGNMENT;
}
@@ -1648,7 +1648,7 @@ assemble_variable (decl, top_level, at_e
#if !defined(ASM_OUTPUT_ALIGNED_COMMON) && !defined(ASM_OUTPUT_ALIGNED_DECL_COMMON) && !defined(ASM_OUTPUT_ALIGNED_BSS)
if ((unsigned HOST_WIDE_INT) DECL_ALIGN (decl) / BITS_PER_UNIT > rounded)
warning_with_decl
- (decl, "requested alignment for %s is greater than implemented alignment of %d.",rounded);
+ (decl, "requested alignment for %s is greater than implemented alignment of %d",rounded);
#endif
asm_emit_uninitialised (decl, name, size, rounded);
============================================================
Index: gcc/cp/class.c
--- gcc/cp/class.c 2001/11/29 22:01:57 1.419
+++ gcc/cp/class.c 2001/12/01 12:37:52
@@ -5258,7 +5258,7 @@ finish_struct (t, attributes)
if (current_class_type)
popclass ();
else
- error ("trying to finish struct, but kicked out due to previous parse errors.");
+ error ("trying to finish struct, but kicked out due to previous parse errors");
if (processing_template_decl)
{
============================================================
Index: gcc/cp/decl.c
--- gcc/cp/decl.c 2001/11/27 14:31:28 1.829
+++ gcc/cp/decl.c 2001/12/01 12:38:28
@@ -7054,7 +7054,7 @@ check_tag_decl (declspecs)
--end example] */
if (saw_typedef)
{
- error ("Missing type-name in typedef-declaration.");
+ error ("Missing type-name in typedef-declaration");
return NULL_TREE;
}
/* Anonymous unions are objects, so they can have specifiers. */;
============================================================
Index: gcc/cp/lex.c
--- gcc/cp/lex.c 2001/11/26 23:44:53 1.258
+++ gcc/cp/lex.c 2001/12/01 12:38:33
@@ -905,7 +905,7 @@ cxx_set_yydebug (value)
extern int yydebug;
yydebug = value;
#else
- warning ("YYDEBUG not defined.");
+ warning ("YYDEBUG not defined");
#endif
}
============================================================
Index: gcc/cp/typeck2.c
--- gcc/cp/typeck2.c 2001/11/29 17:15:56 1.108
+++ gcc/cp/typeck2.c 2001/12/01 12:38:36
@@ -267,7 +267,7 @@ friendly_abort (where, file, line, func)
/* Say nothing. */;
else if (where > 0)
{
- error ("Internal error #%d.", where);
+ error ("Internal error #%d", where);
/* Uncount this error, so internal_error will do the right thing. */
--errorcount;
============================================================
Index: gcc/java/expr.c
--- gcc/java/expr.c 2001/10/26 01:53:55 1.118
+++ gcc/java/expr.c 2001/12/01 12:38:45
@@ -2747,7 +2747,7 @@ expand_byte_code (jcf, method)
if (dead_code_index != -1)
{
/* We've just reached the end of a region of dead code. */
- warning ("Unreachable bytecode from %d to before %d.",
+ warning ("Unreachable bytecode from %d to before %d",
dead_code_index, PC);
dead_code_index = -1;
}
@@ -2784,7 +2784,7 @@ expand_byte_code (jcf, method)
if (dead_code_index != -1)
{
/* We've just reached the end of a region of dead code. */
- warning ("Unreachable bytecode from %d to the end of the method.",
+ warning ("Unreachable bytecode from %d to the end of the method",
dead_code_index);
}
}
============================================================
Index: gcc/java/jcf-parse.c
--- gcc/java/jcf-parse.c 2001/11/09 23:30:43 1.95
+++ gcc/java/jcf-parse.c 2001/12/01 12:38:48
@@ -682,7 +682,7 @@ load_class (class_or_name, verbose)
}
if (!class_loaded && verbose)
- error ("Cannot find file for class %s.", IDENTIFIER_POINTER (saved));
+ error ("Cannot find file for class %s", IDENTIFIER_POINTER (saved));
}
/* Parse the .class file JCF. */
@@ -750,7 +750,7 @@ jcf_parse (jcf)
-fforce-classes-archive-check was specified. */
if (!jcf->right_zip
&& (!flag_emit_class_files || flag_force_classes_archive_check))
- fatal_error ("The `java.lang.Object' that was found in `%s' didn't have the special zero-length `gnu.gcj.gcj-compiled' attribute. This generally means that your classpath is incorrect set. Use `info gcj \"Input Options\"' to see the info page describing how to set the classpath.", jcf->filename);
+ fatal_error ("The `java.lang.Object' that was found in `%s' didn't have the special zero-length `gnu.gcj.gcj-compiled' attribute. This generally means that your classpath is incorrectly set. Use `info gcj \"Input Options\"' to see the info page describing how to set the classpath.", jcf->filename);
}
else
all_class_list = tree_cons (NULL_TREE,
============================================================
Index: gcc/java/jcf-write.c
--- gcc/java/jcf-write.c 2001/11/19 00:13:36 1.93
+++ gcc/java/jcf-write.c 2001/12/01 12:38:56
@@ -2952,7 +2952,7 @@ generate_classfile (clas, state)
tree init = DECL_INITIAL (part);
static tree ConstantValue_node = NULL_TREE;
if (TREE_TYPE (part) != TREE_TYPE (init))
- fatal_error ("field initializer type mismatch.");
+ fatal_error ("field initializer type mismatch");
ptr = append_chunk (NULL, 8, state);
if (ConstantValue_node == NULL_TREE)
ConstantValue_node = get_identifier ("ConstantValue");
============================================================
Index: gcc/java/lex.c
--- gcc/java/lex.c 2001/11/08 15:38:10 1.72
+++ gcc/java/lex.c 2001/12/01 12:39:01
@@ -1312,8 +1312,8 @@ java_lex (java_lval)
if (c == '\n' || c == UEOF) /* ULT */
{
lineno--; /* Refer to the line the terminator was seen */
- java_lex_error ("String not terminated at end of line.", 0);
+ java_lex_error ("String not terminated at end of line", 0);
lineno++;
}
============================================================
Index: gcc/objc/objc-act.c
--- gcc/objc/objc-act.c 2001/11/27 22:31:34 1.108
+++ gcc/objc/objc-act.c 2001/12/01 12:39:30
@@ -5020,7 +4994,7 @@ finish_message_expr (receiver, sel_name,
if (!method_prototype)
{
- warning ("cannot find class (factory) method.");
+ warning ("cannot find class (factory) method");
warning ("return type for `%s' defaults to id",
IDENTIFIER_POINTER (sel_name));
}
@@ -5038,7 +5012,7 @@ finish_message_expr (receiver, sel_name,
{
hash hsh;
- warning ("method `%s' not implemented by protocol.",
+ warning ("method `%s' not implemented by protocol",
IDENTIFIER_POINTER (sel_name));
/* Try and find the method signature in the global pools. */
@@ -5064,7 +5038,7 @@ finish_message_expr (receiver, sel_name,
method_prototype = check_duplicates (hsh);
if (!method_prototype)
{
- warning ("cannot find method.");
+ warning ("cannot find method");
warning ("return type for `%s' defaults to id",
IDENTIFIER_POINTER (sel_name));
}
@@ -5544,13 +5518,13 @@ add_class_method (class, method)
else
{
if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE)
- error ("duplicate definition of class method `%s'.",
+ error ("duplicate definition of class method `%s'",
IDENTIFIER_POINTER (METHOD_SEL_NAME (mth)));
else
{
/* Check types; if different, complain. */
if (!comp_proto_with_proto (method, mth))
- error ("duplicate declaration of class method `%s'.",
+ error ("duplicate declaration of class method `%s'",
IDENTIFIER_POINTER (METHOD_SEL_NAME (mth)));
}
}
@@ -5586,13 +5560,13 @@ add_instance_method (class, method)
else
{
if (TREE_CODE (class) == CLASS_IMPLEMENTATION_TYPE)
- error ("duplicate definition of instance method `%s'.",
+ error ("duplicate definition of instance method `%s'",
IDENTIFIER_POINTER (METHOD_SEL_NAME (mth)));
else
{
/* Check types; if different, complain. */
if (!comp_proto_with_proto (method, mth))
- error ("duplicate declaration of instance method `%s'.",
+ error ("duplicate declaration of instance method `%s'",
IDENTIFIER_POINTER (METHOD_SEL_NAME (mth)));
}
}