re PR c++/18530 (Bogus warnings about shadowed variables __ct, __dt)
PR c++/18530 * cp-tree.h (CTOR_NAME): Remove. (DTOR_NAME): Remove. * decl.c (initialize_predefined_identifiers): Add spaces to the end of constructor and destructor names. PR c++/18530 * g++.dg/warn/Wshadow-3.C: New test. From-SVN: r91179
This commit is contained in:
parent
479ec1d1e0
commit
d6eec20888
@ -1,3 +1,11 @@
|
||||
2004-11-24 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18530
|
||||
* cp-tree.h (CTOR_NAME): Remove.
|
||||
(DTOR_NAME): Remove.
|
||||
* decl.c (initialize_predefined_identifiers): Add spaces to the
|
||||
end of constructor and destructor names.
|
||||
|
||||
2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
PR c++/8929
|
||||
|
@ -3162,8 +3162,6 @@ extern GTY(()) varray_type local_classes;
|
||||
#endif /* NO_DOLLAR_IN_LABEL */
|
||||
|
||||
#define THIS_NAME "this"
|
||||
#define CTOR_NAME "__ct"
|
||||
#define DTOR_NAME "__dt"
|
||||
|
||||
#define IN_CHARGE_NAME "__in_chrg"
|
||||
|
||||
|
@ -2923,13 +2923,15 @@ initialize_predefined_identifiers (void)
|
||||
{ "C++", &lang_name_cplusplus, 0 },
|
||||
{ "C", &lang_name_c, 0 },
|
||||
{ "Java", &lang_name_java, 0 },
|
||||
{ CTOR_NAME, &ctor_identifier, 1 },
|
||||
{ "__base_ctor", &base_ctor_identifier, 1 },
|
||||
{ "__comp_ctor", &complete_ctor_identifier, 1 },
|
||||
{ DTOR_NAME, &dtor_identifier, 1 },
|
||||
{ "__comp_dtor", &complete_dtor_identifier, 1 },
|
||||
{ "__base_dtor", &base_dtor_identifier, 1 },
|
||||
{ "__deleting_dtor", &deleting_dtor_identifier, 1 },
|
||||
/* Some of these names have a trailing space so that it is
|
||||
impossible for them to conflict with names written by users. */
|
||||
{ "__ct ", &ctor_identifier, 1 },
|
||||
{ "__base_ctor ", &base_ctor_identifier, 1 },
|
||||
{ "__comp_ctor ", &complete_ctor_identifier, 1 },
|
||||
{ "__dt ", &dtor_identifier, 1 },
|
||||
{ "__comp_dtor ", &complete_dtor_identifier, 1 },
|
||||
{ "__base_dtor ", &base_dtor_identifier, 1 },
|
||||
{ "__deleting_dtor ", &deleting_dtor_identifier, 1 },
|
||||
{ IN_CHARGE_NAME, &in_charge_identifier, 0 },
|
||||
{ "nelts", &nelts_identifier, 0 },
|
||||
{ THIS_NAME, &this_identifier, 0 },
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-11-24 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18530
|
||||
* g++.dg/warn/Wshadow-3.C: New test.
|
||||
|
||||
2004-11-24 Devang Patel <dpatel@apple.com>
|
||||
|
||||
PR/18555
|
||||
|
8
gcc/testsuite/g++.dg/warn/Wshadow-3.C
Normal file
8
gcc/testsuite/g++.dg/warn/Wshadow-3.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/18530
|
||||
// { dg-options "-Wshadow" }
|
||||
|
||||
struct A {
|
||||
A();
|
||||
~A();
|
||||
void foo (int __ct, int __dt) {}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user