This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7616: New warning request
- From: Sylvain dot Pion at sophia dot inria dot fr
- To: gcc-gnats at gcc dot gnu dot org
- Cc: Sylvain dot Pion at sophia dot inria dot fr
- Date: 16 Aug 2002 20:27:57 -0000
- Subject: c++/7616: New warning request
- Reply-to: Sylvain dot Pion at sophia dot inria dot fr
>Number: 7616
>Category: c++
>Synopsis: New warning request
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Aug 16 13:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Sylvain Pion
>Release: 3.3
>Organization:
>Environment:
Reading specs from ./gcc/Linux_trunc/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: /u/zosma/0/prisme/spion/gcc/gcc_trunc/configure --disable-shared --disable-nls --enable-languages=c++ --prefix=/u/zosma/0/prisme/spion/gcc/Linux_trunc --with-gnu-as --with-gnu-ld --with-as=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/as --with-ld=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/ld
Thread model: posix
gcc version 3.3 20020813 (experimental)
>Description:
Compiling the code below with the SunPRO compiler gives the following warning :
"warning_request.cpp", line 6: Warning: i hides A::i.
1 Warning(s) detected.
G++ doesn't warn for this case, i.e. when the name of an argument of a member function hides a data member.
I think it would be nice to support it.
>How-To-Repeat:
struct A
{
int i;
void f(int i) const {}
};
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: