https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110836
--- Comment #2 from Andris Pavenis ---
Warning would allow to detected problem earlier.
Otherwise it could only be detected later in case when affected structure or
class is part of an library and its objects are not created directly inside the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110836
Bug ID: 110836
Summary: g++ should report when there is no way to create
structure or class
Product: gcc
Version: 13.1.1
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97240
--- Comment #2 from Andris Pavenis ---
Tried with gcc-12.0.1-20220216 (revision
875e493bf5eb04c11bc3846a6bfee47a6f183e3f).
gcc configured without additional configure parameters (Configured with:
../gcc-12.0.1-20220216/configure)
1) /opt/gcc-gi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97240
Andris Pavenis changed:
What|Removed |Added
Known to fail||10.3.0
Known to work|
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");
|
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
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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104365
Bug ID: 104365
Summary: Overload ambiguity not detected
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
10 matches
Mail list logo