Summary: | parser thinks something is a start of a template-id when it is just less than | ||
---|---|---|---|
Product: | gcc | Reporter: | Ivan Godard <igodard> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | chsalvia, fang, foehst, gcc-bugs, igodard, pinskia, reichelt |
Priority: | P2 | Keywords: | rejects-valid |
Version: | 3.4.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | 3.3.3 3.4.0 4.0.0 2.95.3 3.2.3 | Last reconfirmed: | 2005-11-02 02:04:28 |
Bug Depends on: | 11814 | ||
Bug Blocks: | |||
Attachments: |
Compiler output (-v -save-temps)
Source code (-save-temps) (compressed) |
Description
Ivan Godard
2005-03-03 21:46:38 UTC
Created attachment 8321 [details]
Compiler output (-v -save-temps)
Created attachment 8322 [details]
Source code (-save-temps) (compressed)
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. There is another PR about exactly this problem somewhere. Sorry, I'll try to be more original in my PRs :-) 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... *** Bug 24939 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of 10200 *** |