public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13907] New: pedantic needed to disambiguate
@ 2004-01-29  0:13 japple at freeshell dot org
  2004-01-29  1:08 ` [Bug c++/13907] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: japple at freeshell dot org @ 2004-01-29  0:13 UTC (permalink / raw)
  To: gcc-bugs

struct A {
  operator int & ();
  operator const int & () const;
};
                                                                               
          
void f(int &);
void f(const int &);
                                                                               
          
int main() {
  const A x = A();
  f(x);
}

gives

const_overload.cpp: In function `int main()':
const_overload.cpp:12: error: call of overloaded `f(const A&)' is ambiguous
const_overload.cpp:7: error: candidates are: void f(int&)
const_overload.cpp:8: error:                 void f(const int&)

unless -pedantic is set.

-- 
           Summary: pedantic needed to disambiguate
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: japple at freeshell dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: x86 linux


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


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

end of thread, other threads:[~2004-02-22 16:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-29  0:13 [Bug c++/13907] New: pedantic needed to disambiguate japple at freeshell dot org
2004-01-29  1:08 ` [Bug c++/13907] " pinskia at gcc dot gnu dot org
2004-01-29  3:33 ` japple at freeshell dot org
2004-01-29 18:50 ` [Bug c++/13907] [3.3/3.4/3.5 regression] valid conversion rejected unless -pedantic is set bangerth at dealii dot org
2004-01-29 19:02 ` pinskia at gcc dot gnu dot org
2004-01-31  2:48 ` mmitchel at gcc dot gnu dot org
2004-02-02 16:26 ` cvs-commit at gcc dot gnu dot org
2004-02-02 16:42 ` [Bug c++/13907] [3.3 " mmitchel at gcc dot gnu dot org
2004-02-02 16:53 ` cvs-commit at gcc dot gnu dot org
2004-02-15 12:42 ` gdr at gcc dot gnu dot org
2004-02-22 16:06 ` cvs-commit at gcc dot gnu dot org
2004-02-22 16:07 ` gdr 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).