c++/647: G++ fails to parse global qualifier correctly

mark@codesourcery.com mark@codesourcery.com
Mon Oct 16 11:16:00 GMT 2000


>Number:         647
>Category:       c++
>Synopsis:       G++ fails to parse global qualifier correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 16 11:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     mark@codesourcery.com
>Release:        2.96
>Organization:
>Environment:

>Description:
The attached file gets an error from G++:

  /nfs/gandalf/u2/mitchell/tmp/test2.C:8: no file-scope type named `X'

The problem is that G++ tries to parse the second ::X
on line 9 as a type, rather than as a variable.  Then, it
becomes increasingly confused.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test2.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test2.C"

c3RydWN0IFggewogIFggKGludCk7Cn07CmludCBYOwoKdm9pZCBmICgpCnsKICBzdHJ1Y3QgOjpY
IHggKDo6WCk7Cn0K


More information about the Gcc-bugs mailing list