public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-16 13:06 Neil Booth
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Booth @ 2002-05-16 13:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc: Wolfgang Bangerth <bangerth@math.ethz.ch>,
	Reiner Hauser <rhauser@fnal.gov>, gcc-gnats@gcc.gnu.org,
	lerdsuwa@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in template
Date: Thu, 16 May 2002 21:00:51 +0100

 Gerald Pfeifer wrote:-
 
 > On Thu, 16 May 2002, Wolfgang Bangerth wrote:
 > >> Maybe this can go into that 'bugs which aren't really bugs' web page you
 > >> got ? It might give people a clue when they run into similar problems.
 > 
 > If we don't have digraphs disabled by default, that'd be something I'd
 > consider changing.
 
 I disagree - they're part of the language, and we've now released 3.0
 and 3.1 with them enabled by default (and they are in 2.96 too I
 believe).  So there seems little point reverting now - most code will
 have already been fixed.
 
 Neil.


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in  template
@ 2002-05-17 14:26 Jason Merrill
  0 siblings, 0 replies; 10+ messages in thread
From: Jason Merrill @ 2002-05-17 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Jason Merrill <jason@redhat.com>
To: Nathan Sidwell <nathan@codesourcery.com>
Cc: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>,
	Wolfgang Bangerth <bangerth@math.ethz.ch>,
	Reiner Hauser <rhauser@fnal.gov>, gcc-gnats <gcc-gnats@gcc.gnu.org>,
	lerdsuwa <lerdsuwa@gcc.gnu.org>, gcc-bugs <gcc-bugs@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in 
 template
Date: Fri, 17 May 2002 22:09:28 +0100

 >>>>> "Nathan" == Nathan Sidwell <nathan@codesourcery.com> writes:
 
 > It might be nicer though to fiddle the grammar so that where
 > 	PTYPENAME < SCOPED_NAME 
 > appears (under whatever guise it happens to be), we also have the reduction
 > 	PTYPENAME [ : error >
 > 	   error ("did you mean '$1 < ::'?")
 
 Sounds good to me.  Patch, anyone?
 
 Jason


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-16 14:26 John Marshall
  0 siblings, 0 replies; 10+ messages in thread
From: John Marshall @ 2002-05-16 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: John Marshall <johnm@falch.net>
To: Wolfgang Bangerth <bangerth@math.ethz.ch>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in template
Date: Thu, 16 May 2002 23:17:15 +0200

 On Thu, May 16, 2002 at 10:05:23AM +0200, Wolfgang Bangerth wrote:
 > RCS file: /cvsroot/gcc/wwwdocs/htdocs/bugs.html,v
 [...]
 > + colon). There are several such combinations of characters, and 
 > + they are called <em>di-graphs</em>.
 
 Either trivia or typo :-) -- the Standard calls them "digraphs", without
 a hyphen.


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in  template
@ 2002-05-16 13:56 Gabriel Dos Reis
  0 siblings, 0 replies; 10+ messages in thread
From: Gabriel Dos Reis @ 2002-05-16 13:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@codesourcery.com>
To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc: Wolfgang Bangerth <bangerth@math.ethz.ch>,
   Reiner Hauser <rhauser@fnal.gov>, <gcc-gnats@gcc.gnu.org>,
   <lerdsuwa@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in  template
Date: 16 May 2002 22:52:29 +0200

 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
 
 | On Thu, 16 May 2002, Wolfgang Bangerth wrote:
 | >> Maybe this can go into that 'bugs which aren't really bugs' web page you
 | >> got ? It might give people a clue when they run into similar problems.
 | 
 | If we don't have digraphs disabled by default, that'd be something I'd
 | consider changing.
 
 digraphs are part of the language.
 
 -- Gaby


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in  template
@ 2002-05-16 13:26 Nathan Sidwell
  0 siblings, 0 replies; 10+ messages in thread
From: Nathan Sidwell @ 2002-05-16 13:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Nathan Sidwell <nathan@codesourcery.com>
To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc: Wolfgang Bangerth <bangerth@math.ethz.ch>,
   Reiner Hauser <rhauser@fnal.gov>, gcc-gnats <gcc-gnats@gcc.gnu.org>,
   lerdsuwa <lerdsuwa@gcc.gnu.org>, gcc-bugs <gcc-bugs@gcc.gnu.org>,
   gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in 
 template
Date: Thu, 16 May 2002 21:19:58 +0100

 Gerald Pfeifer wrote:
 > If we don't have digraphs disabled by default, that'd be something I'd
 > consider changing.
 no, they're in the language. It might be nicer though to fiddle the
 grammar so that where
 	PTYPENAME < SCOPED_NAME 
 appears (under whatever guise it happens to be), we also have the reduction
 	PTYPENAME [ : error >
 	   error ("did you mean '$1 < ::'?")
 
 > > I append a patch to bugs.html below which lists this as a non-bug. It
 > > might be worthwhile for both 3.1 and 3.2.
 > 
 > It looks fine from the webpages side of things, but I'd like one of
 > the C++ maintainers/regulars to Ack this (simply because this is an
 > area I'm not really an expert in).
 ok by me.
 
 nathan
 
 -- 
 Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
          'But that's a lie.' - 'Yes it is. What's your point?'
 nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-16 11:56 Gerald Pfeifer
  0 siblings, 0 replies; 10+ messages in thread
From: Gerald Pfeifer @ 2002-05-16 11:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: Wolfgang Bangerth <bangerth@math.ethz.ch>
Cc: Reiner Hauser <rhauser@fnal.gov>, <gcc-gnats@gcc.gnu.org>,
   <lerdsuwa@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in
 template
Date: Thu, 16 May 2002 20:55:04 +0200 (CEST)

 On Thu, 16 May 2002, Wolfgang Bangerth wrote:
 >> Maybe this can go into that 'bugs which aren't really bugs' web page you
 >> got ? It might give people a clue when they run into similar problems.
 
 If we don't have digraphs disabled by default, that'd be something I'd
 consider changing.
 
 > I append a patch to bugs.html below which lists this as a non-bug. It
 > might be worthwhile for both 3.1 and 3.2.
 
 It looks fine from the webpages side of things, but I'd like one of
 the C++ maintainers/regulars to Ack this (simply because this is an
 area I'm not really an expert in).
 
 Gerald
 -- 
 Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/
 


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-16  1:06 Wolfgang Bangerth
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Bangerth @ 2002-05-16  1:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@math.ethz.ch>
To: Reiner Hauser <rhauser@fnal.gov>
Cc: gcc-gnats@gcc.gnu.org, <lerdsuwa@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>,
        <gcc-patches@gcc.gnu.org>, <pfeifer@dbai.tuwien.ac.at>
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in
 template
Date: Thu, 16 May 2002 10:05:23 +0200 (CEST)

 > Thanks, who would have thought about di-graphs ;) ? I hesitated a while
 > to submit a bug report, because I thought somebody else surely must have
 > caught this before. I finally did it since the Kai compiler compiled the
 > code without complaints, but it turns out that it has digraphs disabled
 > in the default mode and you have to give some --strict option to enable
 > them.
 > 
 > Maybe this can go into that 'bugs which aren't really bugs' web page you
 > got ? It might give people a clue when they run into similar problems.
 
 I append a patch to bugs.html below which lists this as a non-bug. It 
 might be worthwhile for both 3.1 and 3.2.
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth                  email:           bangerth@math.ethz.ch
                                    www: http://www.math.ethz.ch/~bangerth
 
 
 Index: bugs.html
 ===================================================================
 RCS file: /cvsroot/gcc/wwwdocs/htdocs/bugs.html,v
 retrieving revision 1.56
 diff -c -r1.56 bugs.html
 *** bugs.html   14 May 2002 17:23:17 -0000      1.56
 --- bugs.html   16 May 2002 07:56:59 -0000
 ***************
 *** 614,619 ****
 --- 614,643 ----
   <a href="http://www.validlab.com/goldberg/paper.ps">this paper</a>
   for more information.</p></dd>
   
 + <dt><em>Templates, scoping, and digraphs.</em></dt>
 + 
 + <dd><p>If you have a class in global namespace, say named
 + <code>X</code>, and want to give it as a template argument to some
 + other class, say <code>std::vector</code>, then this here fails with a
 + parser error: <code>std::vector&lt;::X&gt;</code>.
 + </p>
 + 
 + <p>
 + The reason is that the standard mandates that the sequence
 + <code>&lt;:</code> is treated as if it were the token
 + <code>[</code>, and the parser then reports a parse error before the
 + character <code>:</code> (by which it means the second
 + colon). There are several such combinations of characters, and 
 + they are called <em>di-graphs</em>.
 + </p>
 + 
 + <p>
 + The simplest way to avoid this is to write <code>std::vector&lt;
 + ::X&gt;</code>, i.e. place a space between the opening angle bracket
 + and the scope operator.
 + </p></dd>
 + 
 + 
   </dl>
   
   <h3><a name="missing">Missing features</a></h3>
 
 


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-14  8:36 Reiner Hauser
  0 siblings, 0 replies; 10+ messages in thread
From: Reiner Hauser @ 2002-05-14  8:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Reiner Hauser <rhauser@fnal.gov>
To: Wolfgang Bangerth <bangerth@math.ethz.ch>
Cc: gcc-gnats@gcc.gnu.org, lerdsuwa@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in
 template
Date: Tue, 14 May 2002 10:29:42 -0500 (CDT)

 Thanks, who would have thought about di-graphs ;) ? I hesitated a while
 to submit a bug report, because I thought somebody else surely must have
 caught this before. I finally did it since the Kai compiler compiled the
 code without complaints, but it turns out that it has digraphs disabled
 in the default mode and you have to give some --strict option to enable
 them.
 
 Maybe this can go into that 'bugs which aren't really bugs' web page you
 got ? It might give people a clue when they run into similar problems.
 
 cheers, Reiner
 
 -- 
 Reiner Hauser
 Email: rhauser@fnal.gov
 Tel:   (630) 840 8634
 Fermilab, PO Box 500, MS 352, Batavia, IL 60510-0500
 
 On Tue, 14 May 2002, Wolfgang Bangerth wrote:
 
 >
 > About this:
 > >  MyTemplate<::X> test;
 >
 > This is not a bug in the parser, but has to do with di-graphs: the
 > sequence "<:" is considered equivalent to the token "[". Thus, inserting a
 > space between the "<" and "::" resolves this, making the two separate
 > tokens.
 >
 > Since this is standard conforming behavior, the bug report should be
 > closed. (There are already some reports about this in the data base, among
 > which is by me -- that's why I know :-)
 >
 > Regards
 >   Wolfgang
 >
 > -------------------------------------------------------------------------
 > Wolfgang Bangerth                  email:           bangerth@math.ethz.ch
 >                                    www: http://www.math.ethz.ch/~bangerth
 >
 >
 >
 


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template
@ 2002-05-14  7:36 Wolfgang Bangerth
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Bangerth @ 2002-05-14  7:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/6601; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@math.ethz.ch>
To: gcc-gnats@gcc.gnu.org, <lerdsuwa@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>,
        <rhauser@fnal.gov>
Cc:  
Subject: Re: c++/6601: [parser] Parse error when using :: qualified name in
 template
Date: Tue, 14 May 2002 16:27:58 +0200 (CEST)

 About this:
 >  MyTemplate<::X> test;
    
 This is not a bug in the parser, but has to do with di-graphs: the 
 sequence "<:" is considered equivalent to the token "[". Thus, inserting a 
 space between the "<" and "::" resolves this, making the two separate 
 tokens.
 
 Since this is standard conforming behavior, the bug report should be 
 closed. (There are already some reports about this in the data base, among 
 which is by me -- that's why I know :-)
 
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth                  email:           bangerth@math.ethz.ch
                                    www: http://www.math.ethz.ch/~bangerth
 
 


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

* Re: c++/6601: [parser] Parse error when using :: qualified name in template.
@ 2002-05-14  7:00 lerdsuwa
  0 siblings, 0 replies; 10+ messages in thread
From: lerdsuwa @ 2002-05-14  7:00 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rhauser

Old Synopsis: Parse error when using :: qualified name in template.
New Synopsis: [parser] Parse error when using :: qualified name in template.

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Tue May 14 07:00:47 2002
State-Changed-Why:
    To fixed in the new parser.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6601


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

end of thread, other threads:[~2002-05-17 21:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-16 13:06 c++/6601: [parser] Parse error when using :: qualified name in template Neil Booth
  -- strict thread matches above, loose matches on Subject: below --
2002-05-17 14:26 Jason Merrill
2002-05-16 14:26 John Marshall
2002-05-16 13:56 Gabriel Dos Reis
2002-05-16 13:26 Nathan Sidwell
2002-05-16 11:56 Gerald Pfeifer
2002-05-16  1:06 Wolfgang Bangerth
2002-05-14  8:36 Reiner Hauser
2002-05-14  7:36 Wolfgang Bangerth
2002-05-14  7:00 lerdsuwa

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