mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 00:21:18 +08:00
re PR c++/9259 (Calling a non-qualified member function within a sizeof() expression leads to "invalid use of undefined type")
PR c++/9259 * typeck.c (build_class_member_access_expr): Allow to access members of the currently open class. (finish_class_member_access_expr): Likewise. From-SVN: r75948
This commit is contained in:
parent
c0f4b5e40e
commit
21b34b9c09
@ -1,3 +1,10 @@
|
||||
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
PR c++/9259
|
||||
* typeck.c (build_class_member_access_expr): Allow to access members
|
||||
of the currently open class.
|
||||
(finish_class_member_access_expr): Likewise.
|
||||
|
||||
2004-01-15 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR c++/13659
|
||||
|
@ -1570,7 +1570,8 @@ build_class_member_access_expr (tree object, tree member,
|
||||
The type of the first expression shall be "class object" (of a
|
||||
complete type). */
|
||||
object_type = TREE_TYPE (object);
|
||||
if (!complete_type_or_else (object_type, object))
|
||||
if (!currently_open_class (object_type)
|
||||
&& !complete_type_or_else (object_type, object))
|
||||
return error_mark_node;
|
||||
if (!CLASS_TYPE_P (object_type))
|
||||
{
|
||||
@ -1856,7 +1857,8 @@ finish_class_member_access_expr (tree object, tree name)
|
||||
|
||||
The type of the first expression shall be "class object" (of a
|
||||
complete type). */
|
||||
if (!complete_type_or_else (object_type, object))
|
||||
if (!currently_open_class (object_type)
|
||||
&& !complete_type_or_else (object_type, object))
|
||||
return error_mark_node;
|
||||
if (!CLASS_TYPE_P (object_type))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user