[Bug c++/20164] [4.0 Regression] Wrong line number in diagnostic with gcc 4.0

2005-02-23 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-23 
14:46 ---
Testcase:
struct temp
{
  temp(){}
  ~temp(){}
  temp(const temp){}
};
struct crop
{
int ox, oy, dx, dy;
};
struct Parm
{
temp filename;
crop cp;
};
void Foo(Parm x);
void Bar1()
{
Parm p;
p.cp.dx = 0;
Foo(p);
}
void Bar2()
{
Parm p;
p.cp.dy = 0;
Foo(p);
}

the problem is that Parm's copy constructor is at line 21 which is wrong.
This is a regression from earlier 4.0's where the copy constructor was not 
generated lazy.

-- 
   What|Removed |Added

 CC||mmitchel at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-02-23 14:46:15
   date||
Summary|Wrong line number in|[4.0 Regression] Wrong line
   |diagnostic with gcc 4.0 |number in diagnostic with
   ||gcc 4.0
   Target Milestone|--- |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20164


[Bug c++/20164] [4.0 Regression] Wrong line number in diagnostic with gcc 4.0

2005-02-23 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-23 
14:50 ---
Here is another testcase where the lines lines look wrong and can be shown to 
be a regression from 
3.4.0:
struct temp
{
  temp(){}
  temp(const temp){}
};
struct Parm
{
temp filename;
};
void Foo(Parm x);
void Bar1()
{
  Parm p;
  Foo(p);
}
void Bar2()
{
  temp a;
  Parm p(a);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20164