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++/20164] [4.0 Regression] Wrong line number in diagnostic with gcc 4.0


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


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