Commit b4f4233d by Gabriel Dos Reis Committed by Gabriel Dos Reis

lex.c (whitespace_cr): Compress consecutive calls to warning().

2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>

        * lex.c (whitespace_cr): Compress consecutive calls to warning().
        (do_identifier): Ditto for error().

        * pt.c (convert_nontype_argument): Ditto for cp_error().
        (convert_template_argument): Ditto for cp_pedwarn().

From-SVN: r32492
parent 8be1ddca
2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
* lex.c (whitespace_cr): Compress consecutive calls to warning().
(do_identifier): Ditto for error().
* pt.c (convert_nontype_argument): Ditto for cp_error().
(convert_template_argument): Ditto for cp_pedwarn().
2000-03-11 Jason Merrill <jason@casey.cygnus.com> 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
* exception.cc (__check_null_eh_spec): New fn. * exception.cc (__check_null_eh_spec): New fn.
...@@ -1240,7 +1248,7 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> ...@@ -1240,7 +1248,7 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
(__class_type_info::do_find_public_subobj): Likewise. (__class_type_info::do_find_public_subobj): Likewise.
* tinfo2.cc (__dynamic_cast): Remap BOFF parameter. * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
2000-01-19 Gabriel Dos Reis <gdr@codesourcery.coom> 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
* typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn. * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
...@@ -1252,7 +1260,7 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk> ...@@ -1252,7 +1260,7 @@ Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* class.c (dump_class_hierarchy): Make format agree with argument; * class.c (dump_class_hierarchy): Make format agree with argument;
cast pointer to unsigned long and print with %lx. cast pointer to unsigned long and print with %lx.
2000-01-19 Gabriel Dos Reis <gdr@codesourcery> 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Set default line-wrap length to 72. * decl2.c (lang_decode_option): Set default line-wrap length to 72.
......
...@@ -2183,8 +2183,7 @@ whitespace_cr (c) ...@@ -2183,8 +2183,7 @@ whitespace_cr (c)
are undefined. */ are undefined. */
if (pedantic && !newline_warning) if (pedantic && !newline_warning)
{ {
warning ("carriage return in source file"); warning ("carriage return in source file (we only warn about the first carriage return)");
warning ("(we only warn about the first carriage return)");
newline_warning = 1; newline_warning = 1;
} }
return 1; return 1;
...@@ -3495,8 +3494,7 @@ do_identifier (token, parsing, args) ...@@ -3495,8 +3494,7 @@ do_identifier (token, parsing, args)
if (! undeclared_variable_notice) if (! undeclared_variable_notice)
{ {
error ("(Each undeclared identifier is reported only once"); error ("(Each undeclared identifier is reported only once for each function it appears in.)");
error ("for each function it appears in.)");
undeclared_variable_notice = 1; undeclared_variable_notice = 1;
} }
} }
......
/* A Bison parser, made from parse.y /* A Bison parser, made from parse.y
by GNU Bison version 1.28 */ by GNU Bison version 1.27
*/
#define YYBISON 1 /* Identify Bison output. */ #define YYBISON 1 /* Identify Bison output. */
...@@ -4030,8 +4031,8 @@ static const short yycheck[] = { 4, ...@@ -4030,8 +4031,8 @@ static const short yycheck[] = { 4,
78, 79, 80, 81, 82, 83, 84, 85 78, 79, 80, 81, 82, 83, 84, 85
}; };
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple" #line 3 "/BASE/dosreis/share/bison.simple"
/* This file comes from bison-1.28. */ /* This file comes from bison-1.27. */
/* Skeleton output parser for bison, /* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
...@@ -4244,7 +4245,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) ...@@ -4244,7 +4245,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif #endif
#endif #endif
#line 217 "/usr/lib/bison.simple" #line 216 "/BASE/dosreis/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed /* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *. into yyparse. The argument should have type void *.
...@@ -8229,7 +8230,7 @@ case 878: ...@@ -8229,7 +8230,7 @@ case 878:
break;} break;}
} }
/* the action file gets copied in in place of this dollarsign */ /* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/lib/bison.simple" #line 542 "/BASE/dosreis/share/bison.simple"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
......
...@@ -2742,9 +2742,8 @@ convert_nontype_argument (type, expr) ...@@ -2742,9 +2742,8 @@ convert_nontype_argument (type, expr)
if (TREE_CODE (referent) == STRING_CST) if (TREE_CODE (referent) == STRING_CST)
{ {
cp_error ("string literal %E is not a valid template argument", cp_error ("string literal %E is not a valid template argument because it is the address of an object with static linkage",
referent); referent);
error ("because it is the address of an object with static linkage");
return NULL_TREE; return NULL_TREE;
} }
...@@ -3160,8 +3159,7 @@ convert_template_argument (parm, arg, args, complain, i, in_decl) ...@@ -3160,8 +3159,7 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
if (requires_type && ! is_type && TREE_CODE (arg) == SCOPE_REF if (requires_type && ! is_type && TREE_CODE (arg) == SCOPE_REF
&& TREE_CODE (TREE_OPERAND (arg, 0)) == TEMPLATE_TYPE_PARM) && TREE_CODE (TREE_OPERAND (arg, 0)) == TEMPLATE_TYPE_PARM)
{ {
cp_pedwarn ("to refer to a type member of a template parameter,"); cp_pedwarn ("to refer to a type member of a template parameter, use `typename %E'", arg);
cp_pedwarn (" use `typename %E'", arg);
arg = make_typename_type (TREE_OPERAND (arg, 0), arg = make_typename_type (TREE_OPERAND (arg, 0),
TREE_OPERAND (arg, 1), TREE_OPERAND (arg, 1),
...@@ -4300,10 +4298,8 @@ push_tinst_level (d) ...@@ -4300,10 +4298,8 @@ push_tinst_level (d)
return 0; return 0;
last_template_error_tick = tinst_level_tick; last_template_error_tick = tinst_level_tick;
error ("template instantiation depth exceeds maximum of %d", cp_error ("template instantiation depth exceeds maximum of %d (use -ftemplate-depth-NN to increase the maximum) instantiating `%D'",
max_tinst_depth); max_tinst_depth, d);
error (" (use -ftemplate-depth-NN to increase the maximum)");
cp_error (" instantiating `%D'", d);
print_template_context (0); print_template_context (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment