c++/3621: Wrong line number in c++ error message.

johanb@DoCS.UU.SE johanb@DoCS.UU.SE
Mon Jul 9 07:16:00 GMT 2001

>Number:         3621
>Category:       c++
>Synopsis:       Wrong line number in c++ error message.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 09 07:16:01 PDT 2001
>Originator:     Johan Bengtsson
>Release:        3.0
System: Linux Toker 2.4.5-xfs #3 Wed Jul 4 11:52:41 CEST 2001 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --enable-shared --enable-threads --enable-languages=c++ --program-prefix=n : (reconfigured) ../configure --enable-shared --enable-threads --enable-languages=c++

The missing namespace specifier for b on line 9 in the attached program
is reported as being on line 0.

Toker:~/tmp > c++ bug.cc
bug.cc:0: `b' was not declared in this scope
Compile the attached program:
# 1 "bug.cc"
namespace tmp {
  typedef int B;
  B b;

class A {
  int kaka(tmp::B = b);



More information about the Gcc-bugs mailing list