This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12697] Redundant duplicate error message
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2003 00:19:37 -0000
- Subject: [Bug c++/12697] Redundant duplicate error message
- References: <20031020235903.12697.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12697
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-10-21 00:19:36
date| |
------- Additional Comments From bangerth at dealii dot org 2003-10-21 00:19 -------
Confirmed. Here's something shorter:
-------------------------------
void Foo(signed char, signed char);
void Foo(unsigned char, unsigned char);
void Foo(int, int);
void Foo(unsigned int, unsigned int);
int main() {
unsigned char u;
signed char i;
Foo(u, i);
}
--------------------------------------
>From 3.3.2 and present mainline we get
g/x> /home/bangerth/bin/gcc-3.3.2/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:10: error: ISO C++ says that `void Foo(int, int)' and `void Foo(unsigned
char, unsigned char)' are ambiguous even though the worst conversion for the
former is better than the worst conversion for the latter
x.cc:10: error: ISO C++ says that `void Foo(int, int)' and `void Foo(signed
char, signed char)' are ambiguous even though the worst conversion for the
former is better than the worst conversion for the latter
g/x>
g/x>
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:10: error: ISO C++ says that these are ambiguous, even though the worst
conversion for the first is better than the worst conversion for the second:
x.cc:4: note: candidate 1: void Foo(int, int)
x.cc:2: note: candidate 2: void Foo(unsigned char, unsigned char)
x.cc:10: error: ISO C++ says that these are ambiguous, even though the worst
conversion for the first is better than the worst conversion for the second:
x.cc:4: note: candidate 1: void Foo(int, int)
x.cc:1: note: candidate 2: void Foo(signed char, signed char)
Note the message duplication. This seems to be the case ever since the
message first appears with gcc3.0, 2.95 accepted the code silently.
W.