public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15179] Error message can be improved
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
@ 2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
  2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-10  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2007-02-10 09:17 -------
*** Bug 30754 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |benoit dot hudson at gmail
                   |                            |dot com


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


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

* [Bug c++/15179] Error message can be improved
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
  2007-02-10  9:17 ` [Bug c++/15179] Error message can be improved pinskia at gcc dot gnu dot org
@ 2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
  2008-08-18 17:52 ` [Bug c++/15179] bad parse error recovery with missing typename manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-10  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2007-02-10 09:16 -------
*** Bug 28182 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |_vi at list dot ru


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


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

* [Bug c++/15179] bad parse error recovery with missing typename
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
  2007-02-10  9:17 ` [Bug c++/15179] Error message can be improved pinskia at gcc dot gnu dot org
  2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
@ 2008-08-18 17:52 ` manu at gcc dot gnu dot org
  2008-11-15  9:55 ` andris dot pavenis at iki dot fi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-18 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from manu at gcc dot gnu dot org  2008-08-18 17:51 -------
Let's give meaningful short descriptions to the bugs, please.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Error message can be        |bad parse error recovery
                   |improved                    |with missing typename


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


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

* [Bug c++/15179] bad parse error recovery with missing typename
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2008-08-18 17:52 ` [Bug c++/15179] bad parse error recovery with missing typename manu at gcc dot gnu dot org
@ 2008-11-15  9:55 ` andris dot pavenis at iki dot fi
  2009-08-04  9:22 ` manu at gcc dot gnu dot org
  2009-11-08  4:02 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: andris dot pavenis at iki dot fi @ 2008-11-15  9:55 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]



------- Comment #14 from andris dot pavenis at iki dot fi  2008-11-15 09:53 -------
Created an attachment (id=16681)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16681&action=view)
Another C++ example to ilustrate misleading error message about missing
typename keyword

This is a short example where one is getting completely misleeding error
message:

test.cpp:22: error: expected constructor, destructor, or type conversion before
‘&’ token

I had to try to compile this example with Visual C++ to figured out what's the
reason of compiler error was. It reported it more clearly.

Tried:
GNU C++ (GCC) version 4.3.0 20080428 (Red Hat 4.3.0-8) (x86_64-redhat-linux)
GNU C++ version 3.4.6 20060404 (Red Hat 3.4.6-9) (x86_64-redhat-linux)


-- 


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


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

* [Bug c++/15179] bad parse error recovery with missing typename
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2008-11-15  9:55 ` andris dot pavenis at iki dot fi
@ 2009-08-04  9:22 ` manu at gcc dot gnu dot org
  2009-11-08  4:02 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-08-04  9:22 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]



------- Comment #15 from manu at gcc dot gnu dot org  2009-08-04 09:22 -------
Testcase in comment #9 does not produce any output anymore.

Testcase in comment #10 produces:

/home/manuel/src/pr15179.C:8:18: error: type ‘A<yn>’ is not derived from type
‘B<yn>’
/home/manuel/src/pr15179.C:8:23: error: expected ‘;’ before ‘Type’


Testcase in comment #14 produces:

/home/manuel/src/pr15179-3.C: At global scope:
/home/manuel/src/pr15179-3.C:22:23: error: expected constructor, destructor, or
type conversion before ‘&’ token


It seems to me that there is a tentative parse of a type in
cp_parser_decl_specifier_seq, that fails, and then we end up trying to parse
something else until it fails completely.

For the typedef testcases, the code in cp_parser_decl_specifier_seq could just
directly parse the complete typedef and return, because only a type can follow
typedef.

For the non-typedef testcase, it is less clear how to handle a failure to parse
a type, since that may actually mean we are looking at something else.

I don't really know where the "failure" happens. That would need more debugging
that I have time to do now. Any help appreciated.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.4.0
   Last reconfirmed|2005-05-08 17:34:10         |2009-08-04 09:22:11
               date|                            |


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


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

* [Bug c++/15179] bad parse error recovery with missing typename
       [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2009-08-04  9:22 ` manu at gcc dot gnu dot org
@ 2009-11-08  4:02 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-08  4:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from jason at gcc dot gnu dot org  2009-11-08 04:02 -------


*** This bug has been marked as a duplicate of 15946 ***


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2009-11-08  4:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15179-6594@http.gcc.gnu.org/bugzilla/>
2007-02-10  9:17 ` [Bug c++/15179] Error message can be improved pinskia at gcc dot gnu dot org
2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
2008-08-18 17:52 ` [Bug c++/15179] bad parse error recovery with missing typename manu at gcc dot gnu dot org
2008-11-15  9:55 ` andris dot pavenis at iki dot fi
2009-08-04  9:22 ` manu at gcc dot gnu dot org
2009-11-08  4:02 ` jason 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).