public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9315: [3.2/3.3/3.4 regression] problems with overload resolution
@ 2003-03-18 21:16 jason
  0 siblings, 0 replies; 4+ messages in thread
From: jason @ 2003-03-18 21:16 UTC (permalink / raw)
  To: dunkel, gcc-bugs, gcc-prs, jason, reichelt

Synopsis: [3.2/3.3/3.4 regression] problems with overload resolution

Responsible-Changed-From-To: reichelt->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Tue Mar 18 21:16:26 2003
Responsible-Changed-Why:
    i'll deal with this

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


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

* Re: c++/9315: [3.2/3.3/3.4 regression] problems with overload resolution
@ 2003-03-19 18:25 jason
  0 siblings, 0 replies; 4+ messages in thread
From: jason @ 2003-03-19 18:25 UTC (permalink / raw)
  To: dunkel, gcc-bugs, gcc-prs, jason

Synopsis: [3.2/3.3/3.4 regression] problems with overload resolution

State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Wed Mar 19 18:25:10 2003
State-Changed-Why:
    message improved

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


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

* Re: c++/9315: [3.2/3.3/3.4 regression] problems with overload resolution
@ 2003-01-22 10:28 reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2003-01-22 10:28 UTC (permalink / raw)
  To: dunkel, gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: [3.2/3.3/3.4 regression] problems with overload resolution

Responsible-Changed-From-To: unassigned->reichelt
Responsible-Changed-By: reichelt
Responsible-Changed-When: Wed Jan 22 10:28:28 2003
Responsible-Changed-Why:
    Patch submitted, waiting for approval.
    
    http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01547.html

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


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

* Re: c++/9315: [3.2/3.3/3.4 regression] problems with overload resolution
@ 2003-01-16  9:55 reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: reichelt @ 2003-01-16  9:55 UTC (permalink / raw)
  To: dunkel, gcc-bugs, gcc-prs, nobody

Old Synopsis: g++ doesn't create any code for this testcase
New Synopsis: [3.2/3.3/3.4 regression] problems with overload resolution

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Thu Jan 16 01:55:45 2003
State-Changed-Why:
    Confirmed (sort of).
    
    First of all, the message I get is:
    
    testcase2.cxx: In function `int testcase()':
    testcase2.cxx:12: choosing `void operator+(const fix&, double)' over `operator+'
    testcase2.cxx:12:   because worst conversion for the former is better than 
       worst conversion for the latter
    
    That's not a warning, but an error message (a warning would have the word
    "warning" in front of the messages).
    And that's why no object file is generated.
    
    BTW, with gcc 3.3 you cannot confuse errors with warnings any more:
    
    testcase2.cxx: In function `int testcase()':
    testcase2.cxx:12: error: choosing `void operator+(const fix&, double)' over `
       operator+'
    testcase2.cxx:12: error:   because worst conversion for the former is better 
       than worst conversion for the latter
    
    Some questions, however remain:
    Why is that an error and not a warning? At least the wording is strange,
    since the compiler told the user what was done to resolve a problem. 
    If I specify "-pedantic" I get the following message, which is what I
    would expect from an error message (well, almost - the last two lines are
    redundant and could use some clean-up):
    
    testcase2.cxx: In function `int testcase()':
    testcase2.cxx:12: ambiguous overload for `fix& + float&' operator
    testcase2.cxx:12: candidates are: operator+(double, float) <built-in>
    testcase2.cxx:4:                 void operator+(const fix&, double)
    testcase2.cxx:4:                 void operator+(const fix&, double)
    
    In gcc 2.95.3 the situation is handled differently:
    Without "-pedantic" the code compiles (without warning).
    With "-pedantic" we get a similer error message (without the duplicate line):
    
    testcase2.cxx: In function `int testcase()':
    testcase2.cxx:12: ambiguous overload for `fix & + float &'
    testcase2.cxx:12: candidates are: operator +(double, float) <builtin>
    testcase2.cxx:4:                 void operator +(const fix &, double)
    
    To summarize, I would suggest the following:
    * Decide whether the code should compile without "-pedantic" or not.
      If yes, make the error a warning - if no, use the same error message
      as with "-pedantic".
    * Remove the duplicate line in the "-pedantic" error message.
    
    Since the situation is more confusing than in gcc 2.95.3 I rate this
    as a regression.
    
    Regards,
    Volker

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


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

end of thread, other threads:[~2003-03-19 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18 21:16 c++/9315: [3.2/3.3/3.4 regression] problems with overload resolution jason
  -- strict thread matches above, loose matches on Subject: below --
2003-03-19 18:25 jason
2003-01-22 10:28 reichelt
2003-01-16  9:55 reichelt

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