public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "simartin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/29475] [4.0/4.1/4.2 Regression] incomplete  template diagnostics.
Date: Thu, 22 Feb 2007 19:58:00 -0000	[thread overview]
Message-ID: <20070222195808.30396.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29475-7667@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from simartin at gcc dot gnu dot org  2007-02-22 19:58 -------
Subject: Bug 29475

Author: simartin
Date: Thu Feb 22 19:57:55 2007
New Revision: 122236

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122236
Log:
2007-02-22  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/29475
        * cp-tree.h (struct deferred_access_check): New structure to represent
a
        deferred access check. It replaces the previous representation as a
tree.
        (get_deferred_access_checks): Return a vector of struct
        deferred_access_check instead of a tree list.
        (perform_access_checks): Take a vector of struct deferred_access_check
        instead of a tree list.
        (enforce_access, perform_or_defer_access_check): Added an
        extra argument that represents the declaration to use to print
        potential error messages.
        * semantics.c (struct deferred_access): Store the deferred access
checks
        as a vector of struct deferred_access_check instead of a tree list.
        (push_deferring_access_checks): Handle the change in struct
        deferred_access.
        (get_deferred_access_checks): Likewise.
        (pop_to_parent_deferring_access_checks): Likewise.
        (perform_or_defer_access_check): Likewise.
        (perform_access_checks): Take a vector of struct deferred_access_check
        instead of a tree list.
        (finish_non_static_data_member, check_accessibility_of_qualified_id,
        finish_id_expression): Adjusted the call to
perform_or_defer_access_check.
        (pop_to_parent_deferring_access_checks, perform_access_checks,
        perform_or_defer_access_check): Adjusted the call to enforce_access.
        * parser.c (struct tree_check): New structure to store various data
        associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
        (struct cp_token): Changed the value field to be a union with a pointer
to
        a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
        tokens and a tree field for all other tokens.
        (eof_token): Adjusted due to the change in struct cp_token.
        (cp_lexer_get_preprocessor_token): Likewise.
        (cp_lexer_purge_token): Likewise.
        (cp_lexer_purge_tokens_after): Likewise.
        (cp_lexer_print_token): Likewise.
        (cp_parser_error): Likewise.
        (cp_parser_identifier): Likewise.
        (cp_parser_string_literal): Likewise.
        (cp_parser_primary_expression): Likewise.
        (cp_parser_unqualified_id): Likewise.
        (cp_parser_parenthesized_expression_list): Likewise.
        (cp_parser_storage_class_specifier_opt): Likewise.
        (cp_parser_function_specifier_opt): Likewise.
        (cp_parser_type_specifier): Likewise.
        (cp_parser_simple_type_specifier): Likewise.
        (cp_parser_initializer_list): Likewise.
        (cp_parser_member_specification_opt): Likewise.
        (cp_parser_attribute_list): Likewise.
        (cp_parser_objc_expression): Likewise.
        (cp_parser_objc_protocol_qualifiers): Likewise.
        (cp_parser_objc_selector): Likewise.
        (cp_parser_objc_declaration): Likewise.
        (cp_parser_objc_statement): Likewise.
        (cp_parser_omp_clause_name): Likewise.
        (cp_parser_omp_clause_default): Likewise.
        (cp_parser_omp_clause_schedule): Likewise.
        (cp_parser_omp_parallel): Likewise.
        (cp_parser_initial_pragma): Likewise.
        (pragma_lex): Likewise.
        (cp_parser_pre_parsed_nested_name_specifier): Likewise.
        (cp_parser_nested_name_specifier_opt): Likewise.
        Use cp_token::u::tree_check_value to save the token's value, the
        associated deferred checks and its qualifying scope.
        (cp_parser_template_id): Likewise.
        (cp_parser_template_declaration_after_export): Adjusted the call to
        get_deferred_access_checks.
        (cp_parser_init_declarator): Take the access checks as a vector of
struct
        deferred_access_check instead of a tree list.
        (cp_parser_single_declaration): Likewise.
        (cp_parser_perform_template_parameter_access_checks): Likewise.
        (cp_parser_simple_declaration): Adjusted the call to
        cp_parser_init_declarator.
        (cp_parser_explicit_specialization): Adjusted the call to
        cp_parser_single_declaration.
        (cp_parser_template_id, cp_parser_pre_parsed_nested_name_specifier):
        Adjusted the call to perform_or_defer_access_check.
        * init.c (build_offset_ref): Adjusted the call to
        perform_or_defer_access_check.
        * class.c (alter_access, resolve_address_of_overloaded_function):
        Likewise.
        * decl.c (make_typename_type, make_unbound_class_template): Likewise.
        * search.c (lookup_member): Likewise.
        * friend.c (add_friend): Likewise.
        * call.c (enforce_access): Use the new extra argument to build the
        error message.
        (build_op_delete_call): Adjusted the call to
        perform_or_defer_access_check.
        (build_over_call): Likewise.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/access19.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/call.c
    branches/gcc-4_2-branch/gcc/cp/class.c
    branches/gcc-4_2-branch/gcc/cp/cp-tree.h
    branches/gcc-4_2-branch/gcc/cp/decl.c
    branches/gcc-4_2-branch/gcc/cp/friend.c
    branches/gcc-4_2-branch/gcc/cp/init.c
    branches/gcc-4_2-branch/gcc/cp/parser.c
    branches/gcc-4_2-branch/gcc/cp/search.c
    branches/gcc-4_2-branch/gcc/cp/semantics.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/g++.old-deja/g++.other/access11.C


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29475


  parent reply	other threads:[~2007-02-22 19:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-29475-7667@http.gcc.gnu.org/bugzilla/>
2006-10-15 14:52 ` pinskia at gcc dot gnu dot org
2006-10-15 21:29 ` mmitchel at gcc dot gnu dot org
2006-11-05 20:40 ` [Bug c++/29475] [4.0/4.1/4.2/4.3 " patchapp at dberlin dot org
2006-11-20 21:16 ` mmitchel at gcc dot gnu dot org
2006-11-20 22:56 ` simartin at users dot sourceforge dot net
2006-12-16  8:52 ` simartin at gcc dot gnu dot org
2007-02-03 20:40 ` [Bug c++/29475] [4.0/4.1/4.2 " gdr at gcc dot gnu dot org
2007-02-03 21:03 ` pinskia at gcc dot gnu dot org
2007-02-14  8:18 ` pluto at agmk dot net
2007-02-14  9:37 ` mmitchel at gcc dot gnu dot org
2007-02-22 19:58 ` simartin at gcc dot gnu dot org [this message]
2007-02-22 20:09 ` [Bug c++/29475] [4.0/4.1 " simartin at gcc dot gnu dot org
2007-02-22 20:24 ` pluto at agmk dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070222195808.30396.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).