public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49129] New: confusing diagnostic for missing semi-colon after member template
@ 2011-05-23 18:42 redi at gcc dot gnu.org
  2011-05-24 14:14 ` [Bug c++/49129] " froydnj at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-23 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: confusing diagnostic for missing semi-colon after
                    member template
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org
                CC: froydnj@gcc.gnu.org


typedef int I;

struct X
{
  template<class> struct Y { }  // oops, missing ';'

  static I f();
};

expinit.cc:7:12: error: expected initializer before ‘f’


If f returns 'int' instead of a typedef then the error is good:
expinit.cc:5:30: error: expected ‘;’ after struct definition

If X::Y is not a template then the error is good:
expinit.cc:7:10: error: expected ‘;’ at end of member declaration
expinit.cc:7:14: error: ISO C++ forbids declaration of ‘f’ with no type
[-fpermissive]


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

end of thread, other threads:[~2021-06-01  9:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 18:42 [Bug c++/49129] New: confusing diagnostic for missing semi-colon after member template redi at gcc dot gnu.org
2011-05-24 14:14 ` [Bug c++/49129] " froydnj at gcc dot gnu.org
2011-07-24 20:53 ` pinskia at gcc dot gnu.org
2020-03-12 11:58 ` jakub at gcc dot gnu.org
2021-06-01  8:05 ` rguenth at gcc dot gnu.org
2021-06-01  9:15 ` redi at gcc dot gnu.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).