public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20164] New: Wrong line number in diagnostic with gcc 4.0
@ 2005-02-23 18:15 micis at gmx dot de
  2005-02-23 18:21 ` [Bug c++/20164] " micis at gmx dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: micis at gmx dot de @ 2005-02-23 18:15 UTC (permalink / raw)
  To: gcc-bugs

When I compile the source file given below with gcc40 I get strange warnings.
I use the snapshot 20050220, but with older snapshots i get the same results.
The function is correct but the line number is wrong.
By the way: Why is "." replaced by "$" ?

g++40 -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40e --program-
suffix=40e --with-arch=opteron --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.0.0 20050220 (experimental)

gcc40 -c -Wall -O2 -o MeOut.o MeOut.ii
MeOut.cpp: In member function 'void Cla::Bar2()':
MeOut.cpp:36: warning: 'p$cp$dx' is used uninitialized in this function
MeOut.cpp:36: warning: 'p$cp$oy' is used uninitialized in this function
MeOut.cpp:36: warning: 'p$cp$ox' is used uninitialized in this function
MeOut.cpp: In member function 'void Cla::Bar1()':
MeOut.cpp:36: warning: 'p$cp$dy' is used uninitialized in this function
MeOut.cpp:36: warning: 'p$cp$oy' is used uninitialized in this function
MeOut.cpp:36: warning: 'p$cp$ox' is used uninitialized in this function


=======================
#include <tao/ORB.h>

namespace ME
{
    struct  crop
    {
        int ox;
        int oy;
        int dx;
        int dy;
    };
    
    struct  Parm
    {
        TAO_String_Manager filename;
        ME::crop cp;
    };
  
} // module ME


class Cla {
public:
    void Bar1();
    void Bar2();
};


void Foo(ME::Parm x);


void Cla::Bar1()
{
    ME::Parm p;
    p.cp.dx = 0;
    Foo(p); 
}


void Cla::Bar2()
{
    ME::Parm p;
    p.cp.dy = 0;
    Foo(p);
}

-- 
           Summary: Wrong line number in diagnostic with gcc 4.0
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-09-27 16:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 18:15 [Bug c++/20164] New: Wrong line number in diagnostic with gcc 4.0 micis at gmx dot de
2005-02-23 18:21 ` [Bug c++/20164] " micis at gmx dot de
2005-02-23 18:24 ` pinskia at gcc dot gnu dot org
2005-02-23 18:27 ` pinskia at gcc dot gnu dot org
2005-02-23 18:29 ` [Bug c++/20164] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-23 18:36 ` pinskia at gcc dot gnu dot org
2005-02-25  2:48 ` [Bug c++/20164] [3.3/3.4/4.0 " pinskia at gcc dot gnu dot org
2005-03-02 21:23 ` [Bug c++/20164] [3.3/3.4/4.0/4.1 Regression] Wrong line number in diagnostic with gcc 4.0/4.1 aoliva at gcc dot gnu dot org
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
2005-07-22 21:12 ` [Bug c++/20164] [3.4/4.0/4.1 Regression] Wrong line number in diagnostic pinskia at gcc dot gnu dot org
2005-09-27 16:18 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).