public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25751]  New: Poor error when templating on undefined types
@ 2006-01-11 15:22 chris at bubblescope dot net
  2006-02-02 19:47 ` [Bug c++/25751] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 4+ messages in thread
From: chris at bubblescope dot net @ 2006-01-11 15:22 UTC (permalink / raw)
  To: gcc-bugs

#include <vector>

int main(void)
{
  std::vector<foo> v;
  v.begin();
}

Produces:

temp.cc: In function 'int main()':
temp.cc:5: error: 'foo' was not declared in this scope
temp.cc:5: error: template argument 1 is invalid
temp.cc:5: error: template argument 2 is invalid
temp.cc:5: error: invalid type in declaration before ';' token
temp.cc:6: error: request for member 'begin' in 'v', which is of non-class type
'int'

That last warning doesn't seem to make any sense. Perhaps g++ should abandon
parsing / producing errors earlier?


-- 
           Summary: Poor error when templating on undefined types
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris at bubblescope dot net


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



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

end of thread, other threads:[~2022-01-07  5:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25751-4@http.gcc.gnu.org/bugzilla/>
2012-05-24 15:25 ` [Bug c++/25751] Poor error when templating on undefined types paolo.carlini at oracle dot com
2012-05-24 15:30 ` paolo.carlini at oracle dot com
2022-01-07  5:56 ` pinskia at gcc dot gnu.org
2006-01-11 15:22 [Bug c++/25751] New: " chris at bubblescope dot net
2006-02-02 19:47 ` [Bug c++/25751] " pinskia 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).