public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9809: [3.3/3.4 regression] when are builtins brought into view
@ 2003-03-08  9:16 mmitchel
  0 siblings, 0 replies; 2+ messages in thread
From: mmitchel @ 2003-03-08  9:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, tilps

Synopsis: [3.3/3.4 regression] when are builtins brought into view

State-Changed-From-To: analyzed->closed
State-Changed-By: mmitchel
State-Changed-When: Sat Mar  8 09:16:21 2003
State-Changed-Why:
    Fixed in GCC 3.3.

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


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

* Re: c++/9809: [3.3/3.4 regression] when are builtins brought into view
@ 2003-03-05 22:23 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-03-05 22:23 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, tilps

Old Synopsis: 3.4 regression(?) - spurious ambiguity of overloaded function
New Synopsis: [3.3/3.4 regression] when are builtins brought into view

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Mar  5 22:23:18 2003
State-Changed-Why:
    This is actually a serious regression:
    ---------------------
    namespace std {
      class Base {};
    }
    
    struct Derived : public std::Base {
        operator const char*() const;
        operator bool(void) const;
    };
    
    void log(const char* str);
    
    void nothing()
    {
        Derived temp;
        log(temp);
    }
    ----------------------
    This doesn't compile with 3.3 and 3.4:
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
    y.cc: In function `void nothing()':
    y.cc:15: error: call of overloaded `log(Derived&)' is ambiguous
    y.cc:10: error: candidates are: void log(const char*)
    <internal>:15: error:                 double std::log(double)
    
    There's only one log() function in the file, so there
    shouldn't be a problem.
    
    Now, it _does_ compile if we rename the namespace away from
    std, or name the function something else than log(), so
    it looks like if the math functions are brought into
    global namespace if namespace std is involved. That's wrong
    here.
    
    W.

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


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

end of thread, other threads:[~2003-03-08  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-08  9:16 c++/9809: [3.3/3.4 regression] when are builtins brought into view mmitchel
  -- strict thread matches above, loose matches on Subject: below --
2003-03-05 22:23 bangerth

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