public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17395] New: Incorrect lookup for parameters
@ 2004-09-10 13:34 gdr at gcc dot gnu dot org
  2004-09-10 13:45 ` [Bug c++/17395] " gdr at integrable-solutions dot net
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-09-10 13:34 UTC (permalink / raw)
  To: gcc-bugs

G++ is confused about the scope of function paramaters.  
Here is a testcase

    template<int> struct X { };

    void fu(int a, X<sizeof(a)>) { }         // #1

    template<class T>
    void bhar(T a, X<sizeof(a)>) { }          // #2

    int main()
    {
       int x;
       X<sizeof(int)> y;
       fu(x, y);                             // #3
       bhar(x, y);                           // #4
    }

g++ erroneously rejects #1 and #2.

Notice that Comeau online accepts everything except #3 -- but
it should have accepted it.

-- 
           Summary: Incorrect lookup for parameters
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gdr at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: plateform independent


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


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <bug-17395-1000@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-09-08 17:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10 13:34 [Bug c++/17395] New: Incorrect lookup for parameters gdr at gcc dot gnu dot org
2004-09-10 13:45 ` [Bug c++/17395] " gdr at integrable-solutions dot net
2004-09-10 14:19 ` bangerth at dealii dot org
2004-09-10 14:35 ` gdr at integrable-solutions dot net
2004-09-10 14:41 ` bangerth at dealii dot org
2004-12-10  3:08 ` pinskia at gcc dot gnu dot org
2004-12-10  4:36 ` gdr at integrable-solutions dot net
2004-12-10 13:37 ` pinskia at gcc dot gnu dot org
     [not found] <bug-17395-1000@http.gcc.gnu.org/bugzilla/>
2006-09-08 17:26 ` amylaar at gcc dot gnu 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).