summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/g++.dg/parse
Commit message (Collapse)AuthorAgeFilesLines
...
* PR c++/17524mmitchel2004-10-091-0/+7
| | | | | | | | | | | | | | | | | | | * cp-tree.h (check_var_type): New function. * decl.c (check_var_type): New function, split out from ... (grokdeclarator): ... here. * pt.c (tsubst_decl): Use check_var_type. PR c++/17685 * decl.c (grokdeclarator): Disallow declarations of operators as PR c++/17524 * g++.dg/template/static9.C: New test. PR c++/17685 * g++.dg/parse/operator5.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88820 138bc75d-0d04-0410-961f-82ee72b054a4
* Convert diagnostics to use quoting flag q 4/ngdr2004-10-051-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_name_lookup_error, cp_parser_diagnose_invalid_type_name, cp_parser_primary_expression, cp_parser_unqualified_id, cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, cp_parser_jump_statement, cp_parser_simple_declaration, cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, cp_parser_type_parameter, cp_parser_template_id, cp_parser_template_name, cp_parser_direct_declarator, cp_parser_parameter_declaration_list, cp_parser_class_head, cp_parser_base_specifier, cp_parser_lookup_name, cp_parser_late_parsing_default_args, cp_parser_optional_template_keyword cp_parser_elaborated_type_specifier, cp_parser_check_class_key, cp_parser_check_access_in_redeclaration): Use quoting marks. * name-lookup.c (supplement_binding, pushdecl, check_for_out_of_scope_variable, validate_nonmember_using_decl, do_nonmember_using_decl, lookup_tag, set_decl_namespace, push_namespace, do_namespace_alias, do_using_directive, ambiguous_decl, lookup_namespace_name, add_function): Likewise. * method.c (use_thunk): Likewise. * lex.c (unqualified_name_lookup_error, unqualified_fn_lookup_error): Likewise. testsuite/ merlin[1:17]% cd build ~ merlin[1:17]% ls ~/build 3 4 4.0.0 c++0x r tree merlin[1:17]% cd 4.0.0 ~/build merlin[1:17]% cd gcc ~/build/4.0.0 merlin[1:17]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:18:04 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gdr/redhat/egcs/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/bprob/bprob.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/charset/charset.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/compat/compat.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/debug/debug.exp ... Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/other/classkey1.C (test for errors, line 9) FAIL: g++.dg/other/classkey1.C (test for errors, line 11) FAIL: g++.dg/other/classkey1.C (test for errors, line 14) FAIL: g++.dg/other/classkey1.C (test for errors, line 17) FAIL: g++.dg/other/classkey1.C (test for excess errors) FAIL: g++.dg/parse/error15.C (test for errors, line 13) FAIL: g++.dg/parse/error15.C (test for errors, line 14) FAIL: g++.dg/parse/error15.C (test for errors, line 15) FAIL: g++.dg/parse/error15.C (test for errors, line 21) FAIL: g++.dg/parse/error15.C (test for errors, line 22) FAIL: g++.dg/parse/error15.C (test for errors, line 23) FAIL: g++.dg/parse/error15.C (test for errors, line 31) FAIL: g++.dg/parse/error15.C (test for errors, line 32) FAIL: g++.dg/parse/error15.C (test for errors, line 33) FAIL: g++.dg/parse/error15.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \t]+_ZTIP9CTemplateIhE XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .section[^\n\r]*_ZTIP9CTemplateIhE[^\n\r]* FAIL: g++.dg/template/meminit2.C (test for errors, line 10) FAIL: g++.dg/template/meminit2.C (test for errors, line 11) FAIL: g++.dg/template/meminit2.C (test for excess errors) Running /home/gdr/redhat/egcs/gcc/testsuite/g++.dg/gcov/gcov.exp ... FAIL: 102:is -:should be 1 FAIL: g++.dg/gcov/gcov-1.C gcov: 1 failures in line counts, 0 in branch percentamerlin[1:27]% make check-g++ ~/build/4.0.0/gcc (rootme=`${PWDCMD-pwd}`; export rootme; \ srcdir=`cd /home/gdr/redhat/egcs/gcc; ${PWDCMD-pwd}` ; export srcdir ; \ cd testsuite; \ EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \ if [ -f ${rootme}/../expect/expect ] ; then \ TCL_LIBRARY=`cd .. ; cd /home/gdr/redhat/egcs/gcc/../tcl/library ; ${PWDCMD-pwd}` ; \ export TCL_LIBRARY ; fi ; \ `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ ) Test Run By gdr on Tue Oct 5 01:27:39 2004 Native configuration is i686-pc-linux-gnu === g++ tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for tar method.c cfns.gperf cxx-pretty-print.c method.c.~1.315.~ cfns.h cxx-pretty-print.h name-lookup.c ChangeLog decl2.c name-lookup.c.~1.85.~ ChangeLog.1 decl.c name-lookup.h ChangeLog.~1.4404.~ decl.h NEWS ChangeLog.2 dump.c operators.def ChangeLog.3 error.c optimize.c ChangeLog.egcs except.c parser.c ChangeLog.tree-ssa expr.c parser.c.~1.258.~ class.c friend.c pt.c config-lang.in g++spec.c ptree.c cp-gimplify.c init.c repo.c cp-lang.c init.c.~1.396.~ rtti.c cp-objcp-common.c lang-specs.h search.c cp-objcp-common.h lex.c semantics.c cp-tree.def lex.c.~1.349.~ tree.c cp-tree.h Make-lang.in typeck2.c CVS mangle.c typeck.c merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Enter passphrase for RSA key '/home/gdr/.ssh/identity': cvs [diff aborted]: received interrupt signal merlin[7:37]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:38]% l ~/d-5.patch ~/redhat/egcs/gcc/cp merlin[7:39]% cvs -z9 diff -p > ~/d-5.patch ~/redhat/egcs/gcc/cp Warning: Remote host denied X11 forwarding. Warning: Remote host denied authentication agent forwarding. cvs diff: Diffing . merlin[7:40]% l ~/d-5.patch ~/redhat/egcs/gcc/cp You have new mail. merlin[8:21]% cvs -z9 commit ~/redhat/egcs/gcc/cp merlin[8:21]% cd . ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc/cp cvs commit: nothing known about `cp' cvs commit: nothing known about `testsuite' cvs [commit aborted]: correct above errors first! merlin[8:21]% cd .. ~/redhat/egcs/gcc/cp merlin[8:21]% cvs -z9 commit cp testsuite ~/redhat/egcs/gcc cvs commit: Examining cp cvs commit: Examining testsuite cvs commit: Examining testsuite/ada cvs commit: Examining testsuite/ada/acats cvs commit: Examining testsuite/ada/acats/support cvs commit: Examining testsuite/ada/acats/tests cvs commit: Examining testsuite/ada/acats/tests/a cvs commit: Examining testsuite/ada/acats/tests/c2 cvs commit: Examining testsuite/ada/acats/tests/c3 cvs commit: Examining testsuite/ada/acats/tests/c4 cvs commit: Examining testsuite/ada/acats/tests/c5 cvs commit: Examining testsuite/ada/acats/tests/c6 cvs commit: Examining testsuite/ada/acats/tests/c7 cvs commit: Examining testsuite/ada/acats/tests/c8 cvs commit: Examining testsuite/ada/acats/tests/c9 cvs commit: Examining testsuite/ada/acats/tests/ca cvs commit: Examining testsuite/ada/acats/tests/cb cvs commit: Examining testsuite/ada/acats/tests/cc cvs commit: Examining testsuite/ada/acats/tests/cd cvs commit: Examining testsuite/ada/acats/tests/ce cvs commit: Examining testsuite/ada/acats/tests/cxa cvs commit: Examining testsuite/ada/acats/tests/cxb cvs commit: Examining testsuite/ada/acats/tests/cxf cvs commit: Examining testsuite/ada/acats/tests/cxg cvs commit: Examining testsuite/ada/acats/tests/cxh cvs commit: Examining testsuite/ada/acats/tests/cz cvs commit: Examining testsuite/ada/acats/tests/d cvs commit: Examining testsuite/ada/acats/tests/e cvs commit: Examining testsuite/ada/acats/tests/gcc cvs commit: Examining testsuite/ada/acats/tests/l cvs commit: Examining testsuite/config cvs commit: Examining testsuite/consistency.vlad cvs commit: Examining testsuite/consistency.vlad/layout cvs commit: Examining testsuite/consistency.vlad/layout/i960-97r2-results cvs commit: Examining testsuite/g++.dg cvs commit: Examining testsuite/g++.dg/abi cvs commit: Examining testsuite/g++.dg/bprob cvs commit: Examining testsuite/g++.dg/charset cvs commit: Examining testsuite/g++.dg/compat cvs commit: Examining testsuite/g++.dg/compat/abi cvs commit: Examinin git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88552 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/cp:zack2004-09-236-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87985 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16002mmitchel2004-09-171-0/+7
| | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_simple_declaration): Commit to tentative parses after seeing a decl-specifier. (cp_parser_simple_declaration): Eliminate spurious message. (cp_parser_init_declarator): Adjust error message. PR c++/16029 * lex.c (unqualified_name_lookup_error): Mark the dummy declaration as used. PR c++/16002 * g++.dg/template/error18.C: New test. PR c++/16029 * g++.dg/warn/Wunused-8.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87633 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16716mmitchel2004-09-141-0/+9
| | | | | | | | | | | | | | | | | | * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Robustify. PR c++/17327 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with gcc_unreacable. PR c++/16716 * g++.dg/parse/crash17.C: New test. PR c++/17327 * g++.dg/template/enum3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87467 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/break-in-for.C: Fix for -ansi -pedantic-errors.steven2004-09-121-2/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87387 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/17412steven2004-09-111-0/+11
| | | | | | | | | | | | | | | | | | * fold-const.c (fold): Do not try to fold the operand of a CLEANUP_POINT_EXPR if that operand does itself not have any operands. testsuite/ * g++.dg/parse/break-in-for.C: New test. PR middle-end/17417 * langhooks.c (lhd_decl_printable_name): Make sure that this function is called with is a decl node that has an identifier. * tree-pretty-print.c (dump_function_name): New function to wrap PRINT_FUNCTION_NAME and dump_decl_name. (print_call_name): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87363 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16965mmitchel2004-08-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * cp-tree.h (qualified_name_lookup_error): Add parameter. * name-lookup.c (do_class_using_decl): Restrict set of entities passed to cp_emit_debug_info_for_using more carefully. (lookup_qualified_name): Allow lookup_member to return sets of ambiguous entries. * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter. (cp_parser_primary_expression): Handle ambiguous lookups. (cp_parser_template_name): Adjust use of cp_parser_lookup_name. (cp_parser_template_argument): Likewise. (cp_parser_elaborate_type_specifier): Likewise. (cp_parser_namespace_name): Likewise. (cp_parser_class_name): Likewise. (cp_parser_lookup_name_simple): Likewise. * pt.c (tsubst_qualified_id): Handle ambiguous results. (tsubst_expr): Likewise. * semantics.c (qualified_name_lookup_error): Add decl paramter. For ambiguous lookups, print candidates. PR c++/16965 * g++.dg/parse/error17.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86137 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16853mmitchel2004-08-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | * call.c (standard_conversion): Do not accept conversions between pointers to members if the class types are unrelated. PR c++/16618 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile char &" instead of just "char &". PR c++/16870 * pt.c (tsubst): Just return the unknown_type_node. PR c++/16853 * g++.dg/init/ptrmem1.C: New test. PR c++/16618 * g++.dg/parse/offsetof5.C: New test. PR c++/16870 * g++.dg/template/overload3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85840 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16964mmitchel2004-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_class_specifier): Robustify. PR c++/16904 * pt.c (tsubst_copy_and_build): Complain about invalid qualification. PR c++/16929 * pt.c (tsubst_default_argument): Clear out current_class_ptr and current_class_ref while tsubsting. PR c++/16964 * g++.dg/parse/error16.C: New test. PR c++/16904 * g++.dg/template/error14.C: New test. PR c++/16929 * g++.dg/template/error15.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85824 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16971mmitchel2004-08-111-0/+8
| | | | | | | | | | * parser.c (cp_parser_init_declarator): Robustify. PR c++/16971 * g++.dg/parse/crash16.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85776 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/init/null1.C: Fix PR number.mmitchel2004-08-021-1/+1
| | | | | | | * g++.dg/parse/namespace10.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85444 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16338mmitchel2004-08-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro. * call.c (null_ptr_cst_p): Handle variables with constant initializers. * pt.c (convert_nontype_argument): Use DECL_INTEGRAL_CONSTANT_VAR_P. * semantics.c (finish_id_expression): Likewise. PR c++~/16489 * decl.c (duplicate_decls): Reject duplicate namespace declarations. PR c++/16810 * typeck.c (build_ptrmemfunc): Loosen assertion. PR c++/16338 * g++.dg/init/null1.C: New test. * g++.dg/tc1/dr76.C: Adjust error marker. PR c++/16489 * g++.dg/parse/namespace10.C: New test. PR c++/16810 * g++.dg/inherit/ptrmem2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85421 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h (lang_post_pch_load): New variable.mmitchel2004-07-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-pch.c (lang_post_pch_load): Define it. (c_common_read_pch): Use it. * cgraphunit.c (record_call_1): Give the front end a chance to record additional needed entities when a variable is marked as needed. * tlink.c (recompile_files): Robustify. (scan_linker_output): If a symbol is assigned to a file, but after recompilation is not present there, issue an error message. * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define. (lang_decl_flags): Narrow the width of "languages". Add repo_available_p. (DECL_NEEDED_P): Remove. (FOR_EACH_CLONE): New macro. (DECL_REPO_AVAILABLE_P): Likewise. (DECL_TINFO_P): Likewise. (set_linkage_according_to_type): Declare. (import_export_vtable): Remove. (import_export_tinfo): Likewise. (mark_needed): New function. (decl_needed_p): Likewise. (note_vauge_linkage_fn): Likewise. (init_repo): Change prototype. (repo_template_used): Remove. (repo_template_instantiated): Likewise. (repo_emit_p): New function. (repo_export_class_p): Likewise. (no_linkage_check): Change prototype. * class.c (set_linkage_according_to_type): New function. (build_vtable): Use it. Do not call import_export_vtable. Set DECL_IGNORED_P if appropriate. * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P. (make_rtL_for_nonlocal_decls): Check for template instantiations explicitly. (grokfndecl): Adjust call to no_linkage_check. (set_linkage_for_static_data_member): New function. (grokvardecl): Use it. Adjust call to no_linkage_check. (grokdeclarator): Use set_linkage_for_static_data_member. * decl2.c (note_vague_linkage_fn): New function. (note_vague_linkage_var): Likewise. (finish_static_data_member_decl): Use it. (import_export_vtable): Remove. (import_export_class): Use repo_export_class_p. (var_finalized_p): Simplify. (maybe_emit_vtables): Simplify. (mark_needed): New function. (decl_needed_p): Likewise. (import_export_decl): Add documentation and consistency checks. Use repo_emit_p. Handle virtual tables and RTTI information here. (import_export_tinfo): Remove. (write_out_vars): Call import_export_decl. (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted whenever one is. (finish_file): Use decl_needed_p. Do not call import_export_decl for undefined static data members. Do not warn about undefined inlines when using a repository. (mark_used): Use note_vague_linkage_fn. Always defer template instantiations. * lex.c (cxx_init): Adjust call to init_repo. Always set flag_unit_at_a-time. * method.c (synthesize_method): Remove unncessary import_export_decl call. (implicitly_declare_fn): Use set_linkage_according_to_type. * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE. * pt.c (instantiate_class_template): Don't redundantly add classes to keyed_classes. Don't call repo_template_used. (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of templates with internal linkage. (check_instantiated_args): Adjust call to no_linkage_check. (instantiate_template): Use FOR_EACH_CLONE. (mark_definable): New function. (mark_decl_instantiated): Use it. (do_decl_instantiation): Adjust tests for explicit instantiation after "extern template". (instantiate_class_member): Do not use repo_template_instantiated. (do_type_instantiation): Simplify. (instantiate_decl): Use mark_definable. Check repo_emit_p. Simplify. * repo.c (repo_get_id): Remove. (original_repo): Remove. (IDENTIFIER_REPO_USED): Remove. (IDENTIFIER_REPO_CHOSEN): Remove. Remove all #if 0'd code. (repo_template_used): Remove. (repo_template_instantiated): Remove. (temporary_obstack_initialized_p): New variable. (init_repo): Register with lang_post_pch_load. Avoid creating identifiers unnecessarily. Don't use original_repo. Close the file here. (reopen_repo_file_for_write): Not here. (finish_repo): Always write out a new repository file. (repo_emit_p): New function. (repo_export_class_p): Likewise. * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type. (involves_incomplete_p): New function. (tinfo_base_init): Use it. (ptr_initializer): Remove non_public_ptr parameter. (ptm_initializer): Likewise. (get_pseudo_ti_init): Likewise. (unemitted_tinfo_decl_p): Remove. (emit_tinfo_decl): Use import_export_decl. * semantics.c (expand_body): Move updates of static_ctors and static_dtors to ... (expand_or_defer_fn): ... here. * tree.c (no_linkage_check): Add relaxed_p parameter. * g++.dg/abi/inline1.C: New test. * g++.dg/abi/local1-a.cc: Likewise. * g++.dg/abi/local1.C: Likewise. * g++.dg/abi/mangle11.C: Tweak location of warnings. * g++.dg/abi/mangle12.C: Likewise. * g++.dg/abi/mangle17.C: Likewise. * g++.dg/abi/mangle20-2.C: Likewise. * g++.dg/opt/interface1.C: Likewise. * g++.dg/opt/interface1.h: Likewise. * g++.dg/opt/interface1-a.cc: New test. * g++.dg/parse/repo1.C: New test. * g++.dg/template/repo1.C: Likewise. * g++.dg/warn/Winline-1.C: Likewise. * lib/gcc-dg.exp (gcc-dg-test-1): Fix -frepo handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85309 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/attr2.C: Simplify.mmitchel2004-07-221-4/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85060 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16637mmitchel2004-07-201-0/+7
| | | | | | | | | | | * parser.c (cp_parser_simple_type_specifier): Do not record usage of globally-qualified names. PR c++/16637 * g++.dg/parse/lookup4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84965 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove DOS style trailing Carriage Returnskcook2004-07-203-60/+60
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84941 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16337mmitchel2004-07-171-0/+15
| | | | | | | * g++.dg/parse/attr2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84872 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16518mmitchel2004-07-131-0/+7
| | | | | | | | | | | | | | | PR c++/16337 * decl.c (grokvardecl): Make declspecs parameter const. (grokdeclarator): Likewise. Adjust accordingly. * decl.h (grokdeclarator): Adjust declaration. * parser.c (cp_parser_init_declarator): Do not clear decl_specifiers->attributes. PR c++/16518 * g++.dg/parse/mutable1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84646 138bc75d-0d04-0410-961f-82ee72b054a4
* * cp-tree.h (saved_scope): Make old_bindings a vector.mmitchel2004-07-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (unuse_fields): Remove. * name-lookup.h (cxx_saved_binding): Define it. * class.c (pushclass): Don't use unuse_fields. * name-lookup.c (cxx_saved_binding_make): Remove. (store_binding): Add new bindings to a vector, using an accumulator style, rather than adding them to a list. (store_bindings): Adjust accordingly. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (pop_from_top_level): Likewise. * optimize.c (maybe_clone_body): Must push_to_top_level and pop_from_top_level calls outside of loop. * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope calls here from cp_parser_late_parsing_default_args. (cp_parser_save_default_args): Record the class type in which the function is declared. (cp_parser_late_parsing_default_args): Do not call push_nested_class/pop_nested_class. * search.c (dfs_unuse_fields): Remove. (unuse_fields): Remove. * g++.dg/parse/defarg8.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84530 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:nathan2004-06-291-0/+9
| | | | | | | | | | | | | PR c++/16260 * parser.c (cp_parser_template_declaration_after_export): Disable access checks here ... (cp_parser_class_specifier): ... not here. testsuite: PR c++/16260 * g++.dg/parse/crash15.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83851 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/16193mmitchel2004-06-271-0/+10
| | | | | | | | | | | * parser.c (cp_parser_set_decl_spec_type): Refine test for redefinition of built-in types. PR c++/16193 * g++.dg/parse/redef1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83740 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/15947giovannibajo2004-06-151-0/+10
| | | | | | | | | | | * parser.c (cp_parser_template_name): Ctors/dtors never need a template keyword to disambiguate. PR c++/15947 * g++.dg/parse/dtor4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83154 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/15862mmitchel2004-06-111-0/+4
| | | | | | | | | | | * name-lookup.c (unqualified_namespace_lookup): Do not ignore type bindings for undeclared built-ins. PR c++/15862 * g++.dg/parse/enum1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82986 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14932giovannibajo2004-06-011-0/+13
| | | | | | | | | | | * parser.c (cp_parser_postfix_expression): Allow subscript operator in offsetof. PR c++/14932 * g++.dg/parse/offsetof4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82538 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* * lib/target-supports.exp (check_named_sections_available): New.zack2004-04-091-3/+2
| | | | | | | | | | | | | | * lib/gcc-dg.exp (dg-require-named-sections): New. * lib/prune.exp (prune_gcc_output): Incorporate prunes from old-deja.exp. Also prune error-count message from HP linker. * g++.old-deja/old-deja.exp (g++-dg-prune): Delete. * g++.dg/init/init-ref4.C: Use dg-require-weak. * g++.old-deja/g++.pt/static3.C: Likewise. * g++.dg/parse/attr-ctor1.C: Use dg-require-named-sections. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80572 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14545giovannibajo2004-03-191-0/+26
| | | | | | | | | | | | | | * parser.c (cp_parser_functional_cast): A cast to anything but integral or enumaration type is not an integral constant expression. * pt.c (value_dependent_expression_p): Handle cast expressions without operands (such as "int()"). PR c++/14545 * g++.dg/parse/template15.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79672 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14586mmitchel2004-03-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | * cp-tree.h (build_new_op): Change prototype. (build_x_binary_op): Likewise. * call.c (build_new_op): Add overloaded_p parameter. * decl2.c (grok_array_decl): Adjust call to build_new_op. * parser.c (cp_parser_binary_expression): Note that uses of overloaded operators prevents an expression from being considered an integral constant. * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or build_x_binary_op. * semantics.c (finish_call_expr): Likewise. * typeck.c (rationalize_conditional_expr): Likewise. (build_x_indirect_ref): Likewise. (build_x_binary_op): Likewise. (build_x_unary_op): Likewise. (build_x_compound_expr): Likewise. (build_modify_expr): Likewise. * typeck2.c (build_x_arrow): Likewise. PR c++/14586 * g++.dg/parse/non-dependent3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79553 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14550mmitchel2004-03-151-0/+17
| | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_non_integral_constant_expression): Encode more of the idiom that surrounded calls to this function within the function itself (cp_parser_primary_expression): Adjust accordingly. (cp_parser_postfix_expression): Likewise. (cp_parser_unary_expression): Likewise. (cp_parser_cast_expression): Likewise. (cp_parser_assignment_expression): Likewise. (cp_parser_expression): Likewise. (cp_parser_new_expression): Note that new-expressions are not allowed in integral constant expressions. (cp_parser_delete_expression): Likewise. PR c++/14550 * g++.dg/parse/template14.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79498 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14409giovannibajo2004-03-091-0/+20
| | | | | | | | | | | | | | | | | | | * pt.c (determine_specialization): For member templates, match also constness. PR c++/14448 * parser.c (cp_parser_initializer_clause): Fold initializer if it is non-dependent. * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs. PR c++/14409 * g++.dg/template/spec12.C: New test. PR c++/14448 * g++.dg/parse/crash14.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79172 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14432mmitchel2004-03-091-0/+5
| | | | | | | | | | | * name-lookup.c (supplement_binding): Ignore functions that are marked DECL_ANTICIPATED. PR c++/14432 * g++.dg/parse/builtin2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79160 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14401mmitchel2004-03-091-1/+1
| | | | | | | | | | | | | | | | | | * class.c (check_field_decls): Complain about non-static data members of reference type in unions. Propagate CLASSTYPE_REF_FIELDS_NEED_INIT and CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static data members. * init.c (perform_member_init): Complain about mbmers with const type that are not explicitly initialized. PR c++/14401 * g++.dg/init/ctor3.C: New test. * g++.dg/init/union1.C: New test. * g++.dg/ext/anon-struct4.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79158 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14360mmitchel2004-03-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | * parser.c (cp_parser_postfix_expression): Do not perform Koenig lookup if ordinary name-lookup finds a non-function. * pt.c (tsubst_copy_and_build): Likewise. PR c++/14361 * parser.c (cp_parser_late_parsing_default_args): Check that there are no extra tokens after the end of the default-argument expression. PR c++/14360 * g++.old-deja/g++.ns/koenig5.C: Remove some error markers. PR c++/14361 * g++.dg/parse/defarg7.C: New test. PR c++/14359 * g++.dg/template/friend26.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78739 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14324mmitchel2004-03-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lex.c (retrofit_lang_decl): Treat entities with no linkage as having C++ linkage for name-mangling purposes. PR c++/14260 * parser.c (cp_parser_direct_declarator): Recognize constructor declarators that use a template-id to name the class being constructed. PR c++/14337 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes. (tsubst_expr): Do not call tsubst_copy, even when processing_template_decl. PR c++/14324 * g++.dg/abi/mangle21.C: New test. PR c++/14260 * g++.dg/parse/constructor2.C: New test. PR c++/14337 * g++.dg/template/sfinae1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78720 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14278mmitchel2004-02-271-0/+13
| | | | | | | | | | | * parser.c (cp_parser_parameter_declaration_list): Commit to fewer tentative parses. PR c++/14278 * g++.dg/parse/comma1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78542 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/attr-ctor1.C: XFAIL on hppa.nathan2004-02-191-1/+3
| | | | | | | * g++.dg/opt/template1.C: Robustify assembler regexp git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78097 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14181giovannibajo2004-02-191-0/+9
| | | | | | | * g++.dg/parse/new2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78068 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14028giovannibajo2004-02-061-0/+6
| | | | | | | * g++.dg/parse/angle-bracket2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77403 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14008giovannibajo2004-02-052-1/+40
| | | | | | | | * g++.dg/parse/error15.C: New test. * g++.dg/parse/crash11.C: Update dg-error mark. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77324 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/13950mmitchel2004-02-031-0/+22
| | | | | | | | | | | | | | | | * parser.c (cp_parser_class_name): Robustify. PR c++/13970 * parser.c (cp_parser_cache_group): Do not consume the EOF token. PR c++/13950 * g++.dg/template/lookup4.C: New test. PR c++/13970 * g++.dg/parse/error14.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77186 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/14002mmitchel2004-02-032-0/+23
| | | | | | | | | | | * semantics.c (finish_id_expression): Do not return an IDENTIFIER_NODE when lookup finds a PARM_DECL. PR c++/14002 * g++.dg/parse/template13.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77183 138bc75d-0d04-0410-961f-82ee72b054a4
* * g++.dg/parse/error11.C: New test.giovannibajo2004-01-292-0/+65
| | | | | | | * g++.dg/parse/error12.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76846 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/13736mmitchel2004-01-291-0/+13
| | | | | | | | | | | | * parser.c (cp_parser_direct_declarator): Do not prevent backtracking inside a parenthesized declarator. (cp_parser_parameter_declaration): Fix typo in comment. PR c++/13736 * g++.dg/parse/cast2.C (main): New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76825 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/13407giovannibajo2004-01-161-0/+17
| | | | | | | * g++.dg/parse/typename6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75970 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/8856giovannibajo2004-01-151-0/+27
| | | | | | | | * g++.dg/parse/casting-operator2.C: New test. * g++.old-deja/g++.pt/explicit83.C: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75898 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/12335giovannibajo2004-01-141-0/+16
| | | | | | | * g++.dg/parse/dtor3.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75843 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-13 Andrew Pinski <pinskia@physics.uc.edu>pinskia2004-01-131-0/+14
| | | | | | | | | | | | | | PR c++/12709 * c-common.c (finish_fname_decls): Use the chain only if the tree is an expr_stmt. 2004-01-13 Andrew Pinski <pinskia@physics.uc.edu> PR c++/12709 * g++.dg/parse/try-catch-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75814 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/4100ian2004-01-121-0/+8
| | | | | | | | | * g++.dg/parse/friend4.C: New test. * g++.old-deja/g++.pt/niklas01a.C: Mark an error where a class definition is called a friend. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75727 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/3478ian2004-01-111-0/+15
| | | | | | | | * g++.dg/parse/error10.C: New test. * g++.dg/template/arg2.C: Accept "invalid type" error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75689 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud