This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14156] no warning for address of parameter


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]