This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

[using-directive] Regression against FSF GDB


Hi Sami,

I have noticed this regression during the demo.  `print x' works in cases
where it should not.

Current archer-swagiaal-using-directive:
$ ./gdb -nx -q -ex start -ex 'p x' -ex q /tmp/alias
Temporary breakpoint 1 at 0x400560: file alias.C, line 10.
Starting program: /tmp/alias 

Temporary breakpoint 1, main () at alias.C:10
10	  return B::x;
$1 = 9

Current FSF GDB HEAD (+also F10):
$ .../gdb -nx -q -ex start -ex 'p x' -ex q /tmp/alias
Temporary breakpoint 1 at 0x400560: file alias.C, line 10.
Starting program: /tmp/alias 

Temporary breakpoint 1, main () at alias.C:10
10	  return B::x;
No symbol "x" in current context.
The program is running.  Quit anyway (and kill it)? (y or n) y

$ cat /tmp/alias.C
namespace A
{
  int x = 9;
}

namespace B=A;
int
main (void)
{
  return B::x;
}

It can be verified by gcc-c++-4.3.2-7 the reference to bare `x' is not valid:
/tmp/alias2.C: In function ‘int main()’:
/tmp/alias2.C:10: error: ‘x’ was not declared in this scope


Thanks for a fix,
Jan


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