Deleted Added
full compact
cp-lang.c (102780) cp-lang.c (103445)
1/* Language-dependent hooks for C++.
2 Copyright 2001, 2002 Free Software Foundation, Inc.
3 Contributed by Alexandre Oliva <aoliva@redhat.com>
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 108 unchanged lines hidden (view full) ---

117 might have allocated something there. */
118
119static tree
120cp_expr_size (exp)
121 tree exp;
122{
123 if (CLASS_TYPE_P (TREE_TYPE (exp)))
124 {
1/* Language-dependent hooks for C++.
2 Copyright 2001, 2002 Free Software Foundation, Inc.
3 Contributed by Alexandre Oliva <aoliva@redhat.com>
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 108 unchanged lines hidden (view full) ---

117 might have allocated something there. */
118
119static tree
120cp_expr_size (exp)
121 tree exp;
122{
123 if (CLASS_TYPE_P (TREE_TYPE (exp)))
124 {
125 /* The backend should not be interested in the size of an expression
126 of a type with both of these set; all copies of such types must go
127 through a constructor or assignment op. */
128 if (TYPE_HAS_COMPLEX_INIT_REF (TREE_TYPE (exp))
129 && TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp)))
130 abort ();
131 /* This would be wrong for a type with virtual bases, but they are
132 caught by the abort above. */
125 /* This would be wrong for a type with virtual bases, but they should
126 not get here. */
133 return CLASSTYPE_SIZE_UNIT (TREE_TYPE (exp));
134 }
135 else
136 /* Use the default code. */
137 return lhd_expr_size (exp);
138}
127 return CLASSTYPE_SIZE_UNIT (TREE_TYPE (exp));
128 }
129 else
130 /* Use the default code. */
131 return lhd_expr_size (exp);
132}