This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14156] no warning for address of parameter
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2004 13:18:02 -0000
- Subject: [Bug c++/14156] no warning for address of parameter
- References: <20040216095624.14156.d.binderman@virgin.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-16 13:18 -------
New patch which also fixes it for returning fields parts of structs:
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01412.html
This will now warn:
struct ll
{
int i;
};
int *h(struct ll c)
{
return &c.i;/* { dg-warning "address" "" } */
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14156