[Bug c++/104365] Overload ambiguity not detected

2022-02-04 Thread andris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #11 from Andris Pavenis --- OK. New version: 20220203-1.cpp: In function 'int main()': 20220203-1.cpp:19:24: warning: suspicious use of overloaded 'Test(const char [4], const char[4])' 21 | Test test("foo", "bar"); |

[Bug c++/104365] Overload ambiguity not detected

2022-02-04 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Commen

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread andris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #9 from Andris Pavenis --- >> The warning should be in case when both >> 1) there is preferred standard conversion sequence for parameter of one >> overloaded method > >Standard conversions include T -> const T&, and derived-to-base

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #8 from Jonathan Wakely --- (In reply to Andris Pavenis from comment #5) > The warning should be in case when both > 1) there is preferred standard conversion sequence for parameter of one > overloaded method Standard conversions in

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 Jonathan Wakely changed: What|Removed |Added Ever confirmed|1 |0 Status|WAITING

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread andris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #6 from Andris Pavenis --- Suggested format (changed types to get real ambiguity and edited generated message): 20220203-1.cpp: In function 'int main()': 20220203-1.cpp:19:24: warning: call of overloaded 'Test(const char [4], unsign

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread andris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #5 from Andris Pavenis --- The warning should be in case when both 1) there is preferred standard conversion sequence for parameter of one overloaded method 2) there is other user defined conversion sequences for one more more other

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #4 from Jonathan Wakely --- Your original testcase shows one example where you want a warning, but that's not a specification. Should it only warn when std::string and bool are involved, and there's a char* argument? Or should it be

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2022-02-03 Status|UNCONFI

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 Richard Biener changed: What|Removed |Added Severity|normal |enhancement

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread andris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 --- Comment #2 from Andris Pavenis --- OK. Then warning would be nice. Otherwise it is a trap when one chooses to add bool parameter at end after string parameter and other overloaded method with one more string parameter at end is also presen

[Bug c++/104365] Overload ambiguity not detected

2022-02-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Andrew P