[Bug c++/40733] New: No warning is issued when an implicit conversion can lead to a data loss

2009-07-13 Thread photon at seznam dot cz
seznam dot cz http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40733

[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

2009-07-13 Thread photon at seznam dot cz
--- Comment #2 from photon at seznam dot cz 2009-07-13 20:57 --- -Wall has a very misleading name and should probably be changed to match the MSC behaviour (enable all warnings available). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40733

[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

2009-07-14 Thread photon at seznam dot cz
--- Comment #4 from photon at seznam dot cz 2009-07-14 08:37 --- (In reply to comment #3) > and with integer promotion happening with simple stuff like a + b, > some folks will have a hard time to understand that happens which > is why it is not enabled with -Wall. The w

[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

2009-07-14 Thread photon at seznam dot cz
--- Comment #7 from photon at seznam dot cz 2009-07-14 15:13 --- (In reply to comment #5) > -Wconversion hits extremely often, it is definitely not a warning that can or > should be enabled in -Wall, nor in -W. > The fact that "it hits often" should not be

[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

2009-07-14 Thread photon at seznam dot cz
--- Comment #8 from photon at seznam dot cz 2009-07-14 15:31 --- (In reply to comment #6) > > As for Wall, we have users requesting less warnings from Wall and users > requesting more. We try to find a balance. But you are free to suggest that > existing warnings be move

[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

2009-07-14 Thread photon at seznam dot cz
--- Comment #10 from photon at seznam dot cz 2009-07-14 18:11 --- (In reply to comment #9) > > So your definition of -Wall is not very useful at all and will be even more > misleading to users or why the warnings are happening. > MSC's /Wall enables all warnings an

[Bug c++/40752] New: -Wconversion generates false warnings

2009-07-14 Thread photon at seznam dot cz
ummary: -Wconversion generates false warnings Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: photon at seznam dot cz

[Bug c++/40752] -Wconversion: do not warn for operands not larger than target type

2009-07-15 Thread photon at seznam dot cz
--- Comment #6 from photon at seznam dot cz 2009-07-15 07:50 --- (In reply to comment #1) > Theses are not false warnings: > c >>= 1; > > is really c = (int)c >> 1; They are false warnings. The implicit conversion cannot alter the value. -- htt

[Bug c++/40752] -Wconversion: do not warn for operands not larger than target type

2009-07-15 Thread photon at seznam dot cz
--- Comment #7 from photon at seznam dot cz 2009-07-15 07:54 --- (In reply to comment #5) > Then, let's keep this around as an enhancement request. > I think this is actually a bug as the specification of the warning is: Warn for implicit conversions that may alter a val

[Bug c++/40752] -Wconversion: do not warn for operands not larger than target type

2009-07-15 Thread photon at seznam dot cz
--- Comment #11 from photon at seznam dot cz 2009-07-15 16:55 --- (In reply to comment #8) > For: > > c += (char) 1; > > The value can change as you have a wrapping if c is CHAR_MAX. > > Likewise with: > c += c2; > The value cannot change

[Bug c++/40752] -Wconversion: do not warn for operands not larger than target type

2009-07-15 Thread photon at seznam dot cz
--- Comment #14 from photon at seznam dot cz 2009-07-15 18:24 --- (In reply to comment #13) > Or rather from SCHAR_MAX + 1 to SCHAR_MIN :). Since it is 0x7F + 1 == > (int)0x80. So we have a negative value now from a positive value. > This occurs regardless of the implicit c

[Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type

2009-07-16 Thread photon at seznam dot cz
-- photon at seznam dot cz changed: What|Removed |Added Severity|enhancement |normal Summary|-Wconversion: do not warn |-Wconversion

[Bug c++/33470] New: Reassignment of a reference to a polymorphic class fails at runtime

2007-09-18 Thread photon at seznam dot cz
Summary: Reassignment of a reference to a polymorphic class fails at runtime Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned a

[Bug c++/33470] Reassignment of a reference to a polymorphic class fails at runtime

2007-09-18 Thread photon at seznam dot cz
--- Comment #2 from photon at seznam dot cz 2007-09-18 12:01 --- (In reply to comment #1) > No, "B" is correct. > > > A &Aref = Binst; > Aref = Cinst; > > is the same as: > Binst = (A)Cinst; > "Binst = (A)Cin

[Bug c++/33470] Reassignment of a reference to a polymorphic class fails at runtime

2007-09-18 Thread photon at seznam dot cz
--- Comment #3 from photon at seznam dot cz 2007-09-18 15:12 --- (In reply to comment #1) > No, "B" is correct. > > > A &Aref = Binst; > Aref = Cinst; > > is the same as: > Binst = (A)Cinst; > The compiler treats this ca

[Bug c++/33754] New: Default argument of type list < pair < A, B > > compiles only when typedef is used

2007-10-12 Thread photon at seznam dot cz
cc dot gnu dot org ReportedBy: photon at seznam dot cz GCC host triplet: Ubuntu Linux 7.04 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33754

[Bug c++/33754] Default argument of type list < pair < A, B > > compiles only when typedef is used

2007-10-13 Thread photon at seznam dot cz
--- Comment #2 from photon at seznam dot cz 2007-10-13 08:24 --- (In reply to comment #1) > > *** This bug has been marked as a duplicate of 57 *** > >> I should note this bug is suspended. This is because the standard is >> unclear at what is the correct beha

[Bug c++/33754] Default argument of type list < pair < A, B > > compiles only when typedef is used

2007-10-15 Thread photon at seznam dot cz
--- Comment #5 from photon at seznam dot cz 2007-10-15 07:29 --- (In reply to comment #4) > DR 325 describes the ambiguities in the standard. There are a number of > possible solutions to accepting this syntax, with different implementation > complexities, and it is not clear

[Bug c++/33754] Default argument of type list < pair < A, B > > compiles only when typedef is used

2007-10-16 Thread photon at seznam dot cz
--- Comment #7 from photon at seznam dot cz 2007-10-16 09:23 --- (In reply to comment #6) > > What are your thoughts about the other issues raised by 325? > The suggested resolution disregards the syntactical needs of templates and makes 'int Foo (int i = T<1, int>

[Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type

2010-06-12 Thread photon at seznam dot cz
--- Comment #18 from photon at seznam dot cz 2010-06-12 16:46 --- (In reply to comment #17) > The patch was rejected but it may be accepted by using a new -Wno-* option to > disable these warnings. Perhaps -Wno-conversion-after-promotion? > > Suggestions are welcome. >

[Bug c/33980] New: Precompiled header file not removed on error

2007-11-02 Thread photon at seznam dot cz
Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: photon at seznam dot cz GCC host triplet: Linux OpenSuse 10.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33980