public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30548]  New: parse error
@ 2007-01-22 20:39 igodard at pacbell dot net
  2007-01-22 20:40 ` [Bug c++/30548] " igodard at pacbell dot net
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 20:39 UTC (permalink / raw)
  To: gcc-bugs

Only the first message is relevant. The parser seems to think that it is in an
expression and "<" is a relational operator rather than the bracket in front of
a template parameter for the member template function "MMIOize". Note that if
the expression is broken in two (the previous two lines) then it parses OK.
I've tried to write something short that mimics the problem but no luck.


-- 
           Summary: parse error
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
@ 2007-01-22 20:40 ` igodard at pacbell dot net
  2007-01-22 20:41 ` igodard at pacbell dot net
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 20:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from igodard at pacbell dot net  2007-01-22 20:40 -------
Created an attachment (id=12933)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12933&action=view)
compiler output -v


-- 


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
  2007-01-22 20:40 ` [Bug c++/30548] " igodard at pacbell dot net
@ 2007-01-22 20:41 ` igodard at pacbell dot net
  2007-01-22 20:44 ` igodard at pacbell dot net
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 20:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from igodard at pacbell dot net  2007-01-22 20:41 -------
Created an attachment (id=12934)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12934&action=view)
source code (compressed)


-- 


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
  2007-01-22 20:40 ` [Bug c++/30548] " igodard at pacbell dot net
  2007-01-22 20:41 ` igodard at pacbell dot net
@ 2007-01-22 20:44 ` igodard at pacbell dot net
  2007-01-22 21:20 ` igodard at pacbell dot net
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 20:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from igodard at pacbell dot net  2007-01-22 20:44 -------
p.s. if the disambiguator "template" is inserted in front of the call (i.e.
"... .template MMIOize< ..." the the compiler complains that a disambiguating
template keyword can only be used in a template.


-- 


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
                   ` (2 preceding siblings ...)
  2007-01-22 20:44 ` igodard at pacbell dot net
@ 2007-01-22 21:20 ` igodard at pacbell dot net
  2007-01-22 21:54 ` igodard at pacbell dot net
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 21:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from igodard at pacbell dot net  2007-01-22 21:20 -------
p.p.s. The error depends on the kind of primary in front of the selection and
call. If the primary is a variable then no error, as shown in the previous
line. However, you can also make the error go away by wrapping the primary in a
cast:
 component* z =
static_cast<component*>(&serialNumber3003::instance)->MMIOize<serialNumber3003>();
gives no error, but:
 component* z = (&serialNumber3003::instance)->MMIOize<serialNumber3003>();
shows the bug. Seems bizarre to me.


-- 


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
                   ` (3 preceding siblings ...)
  2007-01-22 21:20 ` igodard at pacbell dot net
@ 2007-01-22 21:54 ` igodard at pacbell dot net
  2007-01-23 14:13 ` manu at gcc dot gnu dot org
  2007-01-23 14:54 ` igodard at pacbell dot net
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-22 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from igodard at pacbell dot net  2007-01-22 21:53 -------
OK, found the source of the problem: there's a template function in the base
class and a non-template function of the same name in the derived class, and
the parse is resolving the call to the non-template even though there is an
explicit  template argument ("<...>") present. Is this correct?


-- 


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
                   ` (4 preceding siblings ...)
  2007-01-22 21:54 ` igodard at pacbell dot net
@ 2007-01-23 14:13 ` manu at gcc dot gnu dot org
  2007-01-23 14:54 ` igodard at pacbell dot net
  6 siblings, 0 replies; 8+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-01-23 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from manu at gcc dot gnu dot org  2007-01-23 14:13 -------
Could you provide a smaller testcase?


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org


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


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

* [Bug c++/30548] parse error
  2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
                   ` (5 preceding siblings ...)
  2007-01-23 14:13 ` manu at gcc dot gnu dot org
@ 2007-01-23 14:54 ` igodard at pacbell dot net
  6 siblings, 0 replies; 8+ messages in thread
From: igodard at pacbell dot net @ 2007-01-23 14:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from igodard at pacbell dot net  2007-01-23 14:54 -------
My goof - sorry to trouble you


-- 

igodard at pacbell dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2007-01-23 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-22 20:39 [Bug c++/30548] New: parse error igodard at pacbell dot net
2007-01-22 20:40 ` [Bug c++/30548] " igodard at pacbell dot net
2007-01-22 20:41 ` igodard at pacbell dot net
2007-01-22 20:44 ` igodard at pacbell dot net
2007-01-22 21:20 ` igodard at pacbell dot net
2007-01-22 21:54 ` igodard at pacbell dot net
2007-01-23 14:13 ` manu at gcc dot gnu dot org
2007-01-23 14:54 ` igodard at pacbell dot net

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).