public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20308] New: lost parser
@ 2005-03-03 21:47 igodard at pacbell dot net
2005-03-03 21:48 ` [Bug c++/20308] " igodard at pacbell dot net
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2005-03-03 21:47 UTC (permalink / raw)
To: gcc-bugs
In the attached code, the parser gets confused by a use of operator< in the body
of a function template. If the operator is changed (to ">" or "==" for example)
the code compiles. I've not been able to figure out why it thinks it's in a
constant expression. Changing the variable names involved doesn't make a
difference, so it doesn't see to be a consequence of name clashes.
Ivan
--
Summary: lost parser
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] lost parser
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
@ 2005-03-03 21:48 ` igodard at pacbell dot net
2005-03-03 21:48 ` igodard at pacbell dot net
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2005-03-03 21:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2005-03-03 21:47 -------
Created an attachment (id=8321)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8321&action=view)
Compiler output (-v -save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] lost parser
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
2005-03-03 21:48 ` [Bug c++/20308] " igodard at pacbell dot net
@ 2005-03-03 21:48 ` igodard at pacbell dot net
2005-03-03 23:25 ` [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2005-03-03 21:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2005-03-03 21:48 -------
Created an attachment (id=8322)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8322&action=view)
Source code (-save-temps) (compressed)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
2005-03-03 21:48 ` [Bug c++/20308] " igodard at pacbell dot net
2005-03-03 21:48 ` igodard at pacbell dot net
@ 2005-03-03 23:25 ` pinskia at gcc dot gnu dot org
2005-07-23 21:34 ` bangerth at dealii dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-03 23:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-03 23:25 -------
Hmm, this is the reduced testcase (but I don't know if this is invalid as Comeau also rejects it but I think
it is valid):
template<typename> int nick(int e);
template<int> struct operation{int nick;};
template<int s>
bool alphaMnemonic(const operation<s>& o1, const operation<s>& o2)
{
return o1.nick < o2.nick;
}
If nick was not a template or not declated we accept it, if alphaMnemonic is not a template we accept it.
I think we have a name lookup problem really. if we want o1.nick as a template we need the template
keyword. This is not a regression if this is valid code, I really think it is. ICC 8.0 accepts it.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |3.3.3 3.4.0 4.0.0 2.95.3
| |3.2.3
Last reconfirmed|0000-00-00 00:00:00 |2005-03-03 23:25:22
date| |
Summary|lost parser |parser thinks something is a
| |start of a template-id when
| |it is just less than
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
` (2 preceding siblings ...)
2005-03-03 23:25 ` [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than pinskia at gcc dot gnu dot org
@ 2005-07-23 21:34 ` bangerth at dealii dot org
2005-07-24 0:52 ` igodard at pacbell dot net
2005-07-24 4:55 ` bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2005-07-23 21:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-07-23 21:29 -------
There is another PR about exactly this problem somewhere.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
` (3 preceding siblings ...)
2005-07-23 21:34 ` bangerth at dealii dot org
@ 2005-07-24 0:52 ` igodard at pacbell dot net
2005-07-24 4:55 ` bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2005-07-24 0:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2005-07-24 00:29 -------
Sorry, I'll try to be more original in my PRs :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
` (4 preceding siblings ...)
2005-07-24 0:52 ` igodard at pacbell dot net
@ 2005-07-24 4:55 ` bangerth at dealii dot org
5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2005-07-24 4:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-07-24 04:51 -------
Don't worry, I'm just trying to tighten the net of PRs somehow -- if someone
comes around to fix this PR, she might take a little more time than I have
right now to find that duplicate PR...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20308
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-07-24 4:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-03 21:47 [Bug c++/20308] New: lost parser igodard at pacbell dot net
2005-03-03 21:48 ` [Bug c++/20308] " igodard at pacbell dot net
2005-03-03 21:48 ` igodard at pacbell dot net
2005-03-03 23:25 ` [Bug c++/20308] parser thinks something is a start of a template-id when it is just less than pinskia at gcc dot gnu dot org
2005-07-23 21:34 ` bangerth at dealii dot org
2005-07-24 0:52 ` igodard at pacbell dot net
2005-07-24 4:55 ` bangerth at dealii 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).