This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/10858] failure with calling a method inside sizeof: sorry, unimplemented: `method_call_expr' not supported by dump_expr


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-07-05 23:24:12         |2003-07-16 01:55:04
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-16 01:55 -------
The error message change on the mainline (20030715):
pr10858.cc:8: error: non-constant `sizeof (foo(bar()))' cannot be used as 
   template argument
pr10858.cc:8: error: ISO C++ forbids declaration of `p' with no type
The change in the error message was cause by (in which is a progression):
2003-07-15  Mark Mitchell

        * cp-tree.def (LOOKUP_EXPR): Remove.
        * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
        (LOOKUP_EXPR_GLOBAL): Remove.
        (get_bindings): Remove.
        (is_aggr_type_2): Remove.
        * call.c (resolved_scoped_fn_name): Remove support for
        LOOKUP_EXPR.
        * decl.c (grokfndecl): Likewise.
        (grokdeclarator): Likewise.
        * error.c (dump_decl): Likewise.
        (dump_expr): Likewise.
        * friend.c (do_friend): Likewise.
        * init.c (build_offset_ref): Likewise.
        * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
        LOOKUP_EXPRs
        * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
        * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
        test.
        * pt.c (get_bindings): Give it internal linkage.
        (check_explicit_specialization): Remove support for LOOKUP_EXPR.
        (lookup_template_function): Likewise.
        (for_each_tempalte_parm_r): Likewise.
        (tsubst_decl): Likewise.
        (tsubst_qualified_id): Handle template template parameters.
        (tsubst_copy): Remove support for LOOKUP_EXPR.
        (tsubst_copy_and_build): Likewise.            
        (most_general_template): Likewise.
        (value_dependent_expression_p): Likewise.
        (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
        always dependent.
        * semantics.c (perform_koenig_lookup): Do not create
        IDENTIFIER_NODEs.
        (finish_fname): Likewise.
        (finish_id_expression): Likewise.
        * tree.c (is_aggr_type_2): Remove.


Looks like the only thing left is to fix sizeof(foo(&bar)) to be a constant for 3.4 in fact it 
looks like the error message is wrong.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]