public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53412] New: Error recovery for class types is poor
@ 2012-05-18 22:03 pinskia at gcc dot gnu.org
2012-05-19 0:02 ` [Bug c++/53412] " pinskia at gcc dot gnu.org
2012-05-24 15:23 ` paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-18 22:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53412
Bug #: 53412
Summary: Error recovery for class types is poor
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Take:
#include <vector>
std::vector<i*> a;
void f(int*b)
{
a.pushback(b);
}
--- CUT---
On the trunk we get the following error messages:
t344.cc:3:13: error: ‘i’ was not declared in this scope
std::vector<i*> a;
^
t344.cc:3:15: error: template argument 1 is invalid
std::vector<i*> a;
^
t344.cc:3:15: error: template argument 2 is invalid
std::vector<i*> a;
^
t344.cc:3:18: error: invalid type in declaration before ‘;’ token
std::vector<i*> a;
^
t344.cc: In function ‘void f(int*)’:
t344.cc:7:3: error: request for member ‘pushback’ in ‘a’, which is of non-class
type ‘int’
a.pushback(b);
^
--- CUT ---
The last one seems just plain wrong. Why did the C++ front-end record a as
type int rather than using error_mark_node?
Also the fourth error message seems wrong too as we already have an error that
the type was invalid.
The second and third ones are not really needed for default template arguments
if we already have an error out about the non defaulted ones.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/53412] Error recovery for class types is poor
2012-05-18 22:03 [Bug c++/53412] New: Error recovery for class types is poor pinskia at gcc dot gnu.org
@ 2012-05-19 0:02 ` pinskia at gcc dot gnu.org
2012-05-24 15:23 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-19 0:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53412
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Version|4.7.0 |4.8.0
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/53412] Error recovery for class types is poor
2012-05-18 22:03 [Bug c++/53412] New: Error recovery for class types is poor pinskia at gcc dot gnu.org
2012-05-19 0:02 ` [Bug c++/53412] " pinskia at gcc dot gnu.org
@ 2012-05-24 15:23 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-24 15:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53412
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-24 15:22:08 UTC ---
It's the same issue. Note, the bit about default template arguments is very
easy to fix.
*** This bug has been marked as a duplicate of bug 25751 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-24 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 22:03 [Bug c++/53412] New: Error recovery for class types is poor pinskia at gcc dot gnu.org
2012-05-19 0:02 ` [Bug c++/53412] " pinskia at gcc dot gnu.org
2012-05-24 15:23 ` paolo.carlini at oracle 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).