summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-10 09:02:06 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-10 09:02:06 +0000
commite8d95fdc2b9c6130544b04b13ffb303b0e611c42 (patch)
tree76650e1120092ea70d8d68f3ac66639be6583a19 /gcc/cp/class.c
parent09e3106823e9903c9520609b9c705f42d5ef0762 (diff)
downloadgcc-e8d95fdc2b9c6130544b04b13ffb303b0e611c42.tar.gz
cp:
PR c++ 9483 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p. * decl2.c (constructor_name_p): Avoid repeated constructor_name calls. * decl.c (grokdeclarator): Refactor ctor/dtor detection. testsuite: PR c++ 9483 * g++.dg/other/field1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69180 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5c276a4a3d0..bac2e0974a2 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3177,7 +3177,7 @@ check_field_decls (tree t, tree *access_decls,
/* Core issue 80: A nonstatic data member is required to have a
different name from the class iff the class has a
user-defined constructor. */
- if (constructor_name_p (x, t) && TYPE_HAS_CONSTRUCTOR (t))
+ if (constructor_name_p (DECL_NAME (x), t) && TYPE_HAS_CONSTRUCTOR (t))
cp_pedwarn_at ("field `%#D' with same name as class", x);
/* We set DECL_C_BIT_FIELD in grokbitfield.