gcc/cp: * decl.c (grokfndecl): If ::main is found not to return int, correct it after issuing a diagnostic. (grokdeclarator): If the incoming type was error_mark_node, do not complain about declaring something with no type. (start_function): Change check for ::main not returning int to an assertion, as grokfndecl now catches this when the user did it. * init.c (perform_member_init, sort_mem_initializers) (emit_mem_initializers): Make most diagnostics be issued on the line of current_function_decl, not whatever the current input line is. * parser.c (cp_lexer_peek_token_emit_debug_info): Surround definition and declaration with #ifdef ENABLE_CHECKING. Avoid unnecessary use of fprintf. (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub definitions to avoid warnings. (cp_lexer_new_main): Add assertion that first token is not a padding token. (cp_lexer_new_from_token_array): Fold into ... (cp_lexer_new_from_tokens): ... here. Add assertion that first token is not a padding token. (cp_lexer_set_source_position_from_token): Move nearer to callers. Remove unused lexer argument. (cp_lexer_peek_token): Just print debugging report (if enabled) and return lexer->next_token. (cp_lexer_skip_purged_tokens): Delete. (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make inline, simplify bodies. (cp_lexer_peek_nth_token): Add debugging report a la cp_lexer_peek_token. (cp_lexer_consume_token): Correct commentary. Advance over purged tokens here. Set current source position here, from token to be returned. Avoid unnecessary use of fprintf. (cp_lexer_purge_token): Advance next_token pointer over this and subsequent purged tokens. (cp_parser_error): Adjust source position to that of the peeked token. (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions. (cp_parser_string_literal): Remove some excessive cleverness. (cp_parser_enum_specifier): Call start_enum before consuming the opening brace. (cp_parser_member_declaration): Make the "extra semicolon" diagnostic consistently-worded with the other place this is diagnosed. Explicitly set the diagnostic location to the location of the offending semicolon. (cp_parser_enclosed_template_argument_list): Use %</%> quoting in diagnostics. Do not use cp_parser_require. Set location of diagnostics about improper use of '>>' to location of offending token. (cp_parser_late_parsing_for_member): Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer. (cp_parser_late_parsing_default_args): Likewise. Manually move some logic outside the loop. gcc/testsuite: * g++.dg/ext/complit1.C * g++.dg/other/error2.C * g++.dg/other/nontype-1.C * g++.dg/parse/crash11.C * g++.dg/parse/crash12.C * g++.dg/parse/error15.C * g++.dg/parse/error4.C * g++.dg/parse/tmpl-outside1.C * g++.dg/parse/too-many-tmpl-args1.C * g++.dg/template/dependent-expr3.C * g++.dg/template/error10.C * g++.dg/template/instantiate1.C * g++.dg/template/vtable2.C * g++.dg/warn/Wshadow-1.C * g++.dg/warn/weak1.C * g++.old-deja/g++.brendan/crash16.C * g++.old-deja/g++.brendan/crash18.C * g++.old-deja/g++.brendan/crash48.C * g++.old-deja/g++.brendan/crash49.C * g++.old-deja/g++.brendan/crash55.C * g++.old-deja/g++.brendan/crash56.C * g++.old-deja/g++.brendan/crash8.C * g++.old-deja/g++.brendan/enum11.C * g++.old-deja/g++.brendan/enum8.C * g++.old-deja/g++.brendan/enum9.C * g++.old-deja/g++.brendan/friend3.C * g++.old-deja/g++.brendan/misc14.C * g++.old-deja/g++.bugs/900402_02.C * g++.old-deja/g++.bugs/900404_03.C * g++.old-deja/g++.bugs/900404_04.C * g++.old-deja/g++.bugs/900428_03.C * g++.old-deja/g++.jason/crash4.C * g++.old-deja/g++.jason/overload21.C * g++.old-deja/g++.jason/redecl1.C * g++.old-deja/g++.jason/report.C * g++.old-deja/g++.jason/rfg10.C * g++.old-deja/g++.jason/template30.C * g++.old-deja/g++.law/arm12.C * g++.old-deja/g++.law/ctors5.C * g++.old-deja/g++.law/cvt20.C * g++.old-deja/g++.law/init10.C * g++.old-deja/g++.law/init8.C * g++.old-deja/g++.law/visibility17.C * g++.old-deja/g++.law/visibility7.C * g++.old-deja/g++.mike/net8.C * g++.old-deja/g++.mike/p646.C * g++.old-deja/g++.mike/p700.C * g++.old-deja/g++.mike/p701.C * g++.old-deja/g++.mike/p811.C * g++.old-deja/g++.ns/template13.C * g++.old-deja/g++.other/array3.C * g++.old-deja/g++.other/crash25.C * g++.old-deja/g++.other/dtor3.C * g++.old-deja/g++.other/dtor4.C * g++.old-deja/g++.other/main1.C * g++.old-deja/g++.other/warn7.C * g++.old-deja/g++.pt/crash11.C * g++.old-deja/g++.pt/crash36.C * g++.old-deja/g++.pt/spec22.C * g++.old-deja/g++.pt/spec9.C * g++.old-deja/g++.pt/ttp52.C * g++.old-deja/g++.robertl/eb103.C * g++.old-deja/g++.robertl/eb121.C * g++.old-deja/g++.robertl/eb22.C * g++.old-deja/g++.robertl/eb8.C: Update locations and/or regexps of dg-error markers. Remove markers for some bogus messages that are no longer issued. libstdc++-v3: * testsuite/20_util/memory/auto_ptr/assign_neg.cc * testsuite/23_containers/map/operators/1_neg.cc * testsuite/23_containers/set/operators/1_neg.cc: Update locations and/or regexps of dg-error markers. From-SVN: r87985
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
access1.C | Loading commit data... | |
access2.C | Loading commit data... | |
access3.C | Loading commit data... | |
access4.C | Loading commit data... | |
access5.C | Loading commit data... | |
access6.C | Loading commit data... | |
access7.C | Loading commit data... | |
ambig1.C | Loading commit data... | |
ambig2.C | Loading commit data... | |
ambig3.C | Loading commit data... | |
angle-bracket.C | Loading commit data... | |
angle-bracket2.C | Loading commit data... | |
args1.C | Loading commit data... | |
array-size1.C | Loading commit data... | |
attr-ctor1.C | Loading commit data... | |
attr1.C | Loading commit data... | |
attr2.C | Loading commit data... | |
break-in-for.C | Loading commit data... | |
builtin1.C | Loading commit data... | |
builtin2.C | Loading commit data... | |
cast1.C | Loading commit data... | |
cast2.C | Loading commit data... | |
casting-operator1.C | Loading commit data... | |
casting-operator2.C | Loading commit data... | |
class1.C | Loading commit data... | |
comma1.C | Loading commit data... | |
concat1.C | Loading commit data... | |
condexpr1.C | Loading commit data... | |
constant1.C | Loading commit data... | |
constant2.C | Loading commit data... | |
constant3.C | Loading commit data... | |
constant4.C | Loading commit data... | |
constructor1.C | Loading commit data... | |
constructor2.C | Loading commit data... | |
conv_op1.C | Loading commit data... | |
crash1.C | Loading commit data... | |
crash10.C | Loading commit data... | |
crash11.C | Loading commit data... | |
crash12.C | Loading commit data... | |
crash13.C | Loading commit data... | |
crash14.C | Loading commit data... | |
crash15.C | Loading commit data... | |
crash16.C | Loading commit data... | |
crash17.C | Loading commit data... | |
crash2.C | Loading commit data... | |
crash3.C | Loading commit data... | |
crash4.C | Loading commit data... | |
crash5.C | Loading commit data... | |
crash6.C | Loading commit data... | |
crash7.C | Loading commit data... | |
crash9.C | Loading commit data... | |
ctor1.C | Loading commit data... | |
dce1.C | Loading commit data... | |
decl-specifier-1.C | Loading commit data... | |
def-tmpl-arg1.C | Loading commit data... | |
defarg1.C | Loading commit data... | |
defarg2.C | Loading commit data... | |
defarg3.C | Loading commit data... | |
defarg4.C | Loading commit data... | |
defarg5.C | Loading commit data... | |
defarg6.C | Loading commit data... | |
defarg7.C | Loading commit data... | |
defarg8.C | Loading commit data... | |
direct-initialization-2.C | Loading commit data... | |
dtor1.C | Loading commit data... | |
dtor2.C | Loading commit data... | |
dtor3.C | Loading commit data... | |
dtor4.C | Loading commit data... | |
dupl-tmpl-args1.C | Loading commit data... | |
elab1.C | Loading commit data... | |
elab2.C | Loading commit data... | |
enum1.C | Loading commit data... | |
error1.C | Loading commit data... | |
error10.C | Loading commit data... | |
error11.C | Loading commit data... | |
error12.C | Loading commit data... | |
error13.C | Loading commit data... | |
error14.C | Loading commit data... | |
error15.C | Loading commit data... | |
error16.C | Loading commit data... | |
error17.C | Loading commit data... | |
error18.C | Loading commit data... | |
error2.C | Loading commit data... | |
error3.C | Loading commit data... | |
error4.C | Loading commit data... | |
error5.C | Loading commit data... | |
error6.C | Loading commit data... | |
error7.C | Loading commit data... | |
error8.C | Loading commit data... | |
error9.C | Loading commit data... | |
explicit1.C | Loading commit data... | |
expr1.C | Loading commit data... | |
expr2.C | Loading commit data... | |
extern-C-1.C | Loading commit data... | |
friend1.C | Loading commit data... | |
friend2.C | Loading commit data... | |
friend3.C | Loading commit data... | |
friend4.C | Loading commit data... | |
func-def1.C | Loading commit data... | |
funptr1.C | Loading commit data... | |
fused-params1.C | Loading commit data... | |
inline1.C | Loading commit data... | |
int-as-enum1.C | Loading commit data... | |
invalid-op1.C | Loading commit data... | |
lookup1.C | Loading commit data... | |
lookup2.C | Loading commit data... | |
lookup3.C | Loading commit data... | |
lookup4.C | Loading commit data... | |
missing-template1.C | Loading commit data... | |
mutable1.C | Loading commit data... | |
named_ops.C | Loading commit data... | |
namespace1.C | Loading commit data... | |
namespace10.C | Loading commit data... | |
namespace2.C | Loading commit data... | |
namespace3.C | Loading commit data... | |
namespace4.C | Loading commit data... | |
namespace5.C | Loading commit data... | |
namespace6.C | Loading commit data... | |
namespace7.C | Loading commit data... | |
namespace8.C | Loading commit data... | |
namespace9.C | Loading commit data... | |
new1.C | Loading commit data... | |
new2.C | Loading commit data... | |
no-typename1.C | Loading commit data... | |
no-value1.C | Loading commit data... | |
non-dependent1.C | Loading commit data... | |
non-dependent2.C | Loading commit data... | |
non-dependent3.C | Loading commit data... | |
non-templ1.C | Loading commit data... | |
nontype1.C | Loading commit data... | |
octal1.C | Loading commit data... | |
offsetof1.C | Loading commit data... | |
offsetof2.C | Loading commit data... | |
offsetof3.C | Loading commit data... | |
offsetof4.C | Loading commit data... | |
offsetof5.C | Loading commit data... | |
operator1.C | Loading commit data... | |
operator2.C | Loading commit data... | |
operator3.C | Loading commit data... | |
operator4.C | Loading commit data... | |
parameter-declaration-1.C | Loading commit data... | |
parens1.C | Loading commit data... | |
parens2.C | Loading commit data... | |
parse1.C | Loading commit data... | |
parse2.C | Loading commit data... | |
parse3.C | Loading commit data... | |
parse4.C | Loading commit data... | |
parse5.C | Loading commit data... | |
parse6.C | Loading commit data... | |
parse7.C | Loading commit data... | |
primary-expression-1.C | Loading commit data... | |
ptrmem1.C | Loading commit data... | |
qualified1.C | Loading commit data... | |
qualified2.C | Loading commit data... | |
redef1.C | Loading commit data... | |
ref1.C | Loading commit data... | |
repo1.C | Loading commit data... | |
ret-type1.C | Loading commit data... | |
ret-type2.C | Loading commit data... | |
saved1.C | Loading commit data... | |
semicolon1.C | Loading commit data... | |
semicolon1.h | Loading commit data... | |
specialization1.C | Loading commit data... | |
stack1.C | Loading commit data... | |
stmtexpr1.C | Loading commit data... | |
stmtexpr2.C | Loading commit data... | |
stmtexpr3.C | Loading commit data... | |
struct-as-enum1.C | Loading commit data... | |
template1.C | Loading commit data... | |
template10.C | Loading commit data... | |
template11.C | Loading commit data... | |
template12.C | Loading commit data... | |
template13.C | Loading commit data... | |
template14.C | Loading commit data... | |
template15.C | Loading commit data... | |
template2.C | Loading commit data... | |
template3.C | Loading commit data... | |
template4.C | Loading commit data... | |
template5.C | Loading commit data... | |
template6.C | Loading commit data... | |
template7.C | Loading commit data... | |
template8.C | Loading commit data... | |
template9.C | Loading commit data... | |
tmpl-outside1.C | Loading commit data... | |
tmpl-tmpl-operator1.C | Loading commit data... | |
tmpl-tmpl-param1.C | Loading commit data... | |
too-many-tmpl-args1.C | Loading commit data... | |
try-catch-1.C | Loading commit data... | |
typedef1.C | Loading commit data... | |
typedef2.C | Loading commit data... | |
typedef3.C | Loading commit data... | |
typedef4.C | Loading commit data... | |
typedef5.C | Loading commit data... | |
typename1.C | Loading commit data... | |
typename2.C | Loading commit data... | |
typename3.C | Loading commit data... | |
typename4.C | Loading commit data... | |
typename5.C | Loading commit data... | |
typename6.C | Loading commit data... | |
undefined1.C | Loading commit data... | |
undefined2.C | Loading commit data... | |
undefined3.C | Loading commit data... | |
undefined4.C | Loading commit data... | |
undefined5.C | Loading commit data... | |
undefined6.C | Loading commit data... | |
undefined7.C | Loading commit data... | |
using1.C | Loading commit data... | |
using2.C | Loading commit data... | |
using3.C | Loading commit data... | |
varmod1.C | Loading commit data... | |
wrong-inline1.C | Loading commit data... |