public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14177] New: syntax error parsing valid C++ expr
@ 2012-05-29 21:11 jan.kratochvil at redhat dot com
2012-05-30 22:32 ` [Bug c++/14177] " jan.kratochvil at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-05-29 21:11 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14177
Bug #: 14177
Summary: syntax error parsing valid C++ expr
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@sourceware.org
ReportedBy: jan.kratochvil@redhat.com
Classification: Unclassified
class C { public:
static const int i; };
const int C::i = 42;
int f (int x) { return x + 1; }
int main () { f (5); }
(gdb) p C::i
$1 = 42
(gdb) p f(5)
$2 = 6
(gdb) p f('C::i')
$3 = 43
(gdb) p f(C::i)
A syntax error in expression, near `i)'.
It will use TYPE_INSTANCE line 435:
exp : exp '(' nonempty_typelist ')' const_or_volatile
instead of line 391:
exp : exp '(' arglist ')' %prec ARROW
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/14177] syntax error parsing valid C++ expr
2012-05-29 21:11 [Bug c++/14177] New: syntax error parsing valid C++ expr jan.kratochvil at redhat dot com
@ 2012-05-30 22:32 ` jan.kratochvil at redhat dot com
2012-06-13 16:10 ` cvs-commit at gcc dot gnu.org
2012-06-13 16:12 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-05-30 22:32 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14177
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at sourceware |jan.kratochvil at redhat
|dot org |dot com
--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-05-30 22:31:51 UTC ---
[patch] PR c++/14177 - Fix parsing TYPENAME:: in parentheses
http://sourceware.org/ml/gdb-patches/2012-05/msg01068.html
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/14177] syntax error parsing valid C++ expr
2012-05-29 21:11 [Bug c++/14177] New: syntax error parsing valid C++ expr jan.kratochvil at redhat dot com
2012-05-30 22:32 ` [Bug c++/14177] " jan.kratochvil at redhat dot com
@ 2012-06-13 16:10 ` cvs-commit at gcc dot gnu.org
2012-06-13 16:12 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-06-13 16:10 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14177
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-13 16:10:21 UTC ---
CVSROOT: /cvs/src
Module name: src
Changes by: jkratoch@sourceware.org 2012-06-13 16:10:10
Modified files:
gdb : ChangeLog c-exp.y cp-namespace.c cp-support.h
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.cp: cpexprs.cc cpexprs.exp
Log message:
gdb/
PR c++/14177 - Fix parsing TYPENAME:: in parentheses.
* c-exp.y (classify_inner_name): Remove caller assumptions in the
function comment. Return ERROR for unresolved cases. Implement
returning proper NAME.
(yylex): Accept also NAME from classify_inner_name.
* cp-namespace.c (cp_lookup_nested_type): Rename to ...
(cp_lookup_nested_symbol): ... here. Return any found symbol, not just
LOC_TYPEDEF type.
* cp-support.h (cp_lookup_nested_type): Update its declaration.
gdb/testsuite/
PR c++/14177 - Fix parsing TYPENAME:: in parentheses.
* gdb.cp/cpexprs.cc (class CV, CV::i, ATTRIBUTE_USED, CV_f): New.
(test_function): Call CV_f.
* gdb.cp/cpexprs.exp (p 'CV::m(int)', p CV::m(int))
(p 'CV::m(int) const', p CV::m(int) const, p 'CV::m(int) volatile')
(p CV::m(int) volatile, p 'CV::m(int) const volatile')
(p CV::m(int) const volatile, p CV_f(int), p CV_f(CV::t))
(p CV_f(CV::i)): New tests.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14357&r2=1.14358
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/c-exp.y.diff?cvsroot=src&r1=1.89&r2=1.90
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-namespace.c.diff?cvsroot=src&r1=1.57&r2=1.58
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/cp-support.h.diff?cvsroot=src&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3222&r2=1.3223
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/cpexprs.cc.diff?cvsroot=src&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/cpexprs.exp.diff?cvsroot=src&r1=1.8&r2=1.9
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/14177] syntax error parsing valid C++ expr
2012-05-29 21:11 [Bug c++/14177] New: syntax error parsing valid C++ expr jan.kratochvil at redhat dot com
2012-05-30 22:32 ` [Bug c++/14177] " jan.kratochvil at redhat dot com
2012-06-13 16:10 ` cvs-commit at gcc dot gnu.org
@ 2012-06-13 16:12 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-06-13 16:12 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=14177
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-06-13 16:11:55 UTC ---
Checked in.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-13 16:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-29 21:11 [Bug c++/14177] New: syntax error parsing valid C++ expr jan.kratochvil at redhat dot com
2012-05-30 22:32 ` [Bug c++/14177] " jan.kratochvil at redhat dot com
2012-06-13 16:10 ` cvs-commit at gcc dot gnu.org
2012-06-13 16:12 ` jan.kratochvil at redhat dot com
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).