[Bug c++/61528] New: std::min std::max and RValue

2014-06-16 Thread lisp2d at lisp2d dot net
++ Assignee: unassigned at gcc dot gnu.org Reporter: lisp2d at lisp2d dot net Declaring reference of result of functions MIN or MAX we get a DEAD memory when one of arguments is an RValue. // gcc -std=c++11 -Os bug.cpp // gcc -std=c++11 -O2 bug.cpp #includeiostream void f(size_t const x

[Bug c++/61528] std::min std::max and RValue

2014-06-16 Thread lisp2d at lisp2d dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61528 --- Comment #2 from Lisp2D lisp2d at lisp2d dot net --- Issue a warning would not hurt.

[Bug c++/61528] std::min std::max and RValue

2014-06-16 Thread lisp2d at lisp2d dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61528 --- Comment #4 from Lisp2D lisp2d at lisp2d dot net --- Likely error in the standard. The right set of functions must return a copy of the data and return a the temporary link with real data. Working version of it: size_t const min2(size_t

[Bug c++/55166] New: c++11: std::string and =std:move makes swapping

2012-11-01 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55166 Bug #: 55166 Summary: c++11: std::string and =std:move makes swapping Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal

[Bug c++/55098] New: c++11: move constructor doesn't run at all (but with a hammer)

2012-10-27 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098 Bug #: 55098 Summary: c++11: move constructor doesn't run at all (but with a hammer) Classification: Unclassified Product: gcc Version: 4.7.1 Status:

[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)

2012-10-27 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098 --- Comment #1 from Lisp2D lisp2d at lisp2d dot net 2012-10-27 15:01:42 UTC --- May be it is optimisation, but without instruction and with side effects.

[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)

2012-10-27 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098 Lisp2D lisp2d at lisp2d dot net changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)

2012-10-27 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098 --- Comment #4 from Lisp2D lisp2d at lisp2d dot net 2012-10-27 15:24:06 UTC --- (In reply to comment #3) My opinion is to enable elide-constructors in -sdt=c++11. Programers in this standard use own move-constructors with own-side

[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)

2012-10-27 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098 --- Comment #5 from Lisp2D lisp2d at lisp2d dot net 2012-10-27 15:46:39 UTC --- OK. Right path is: DON'T return anything.

[Bug c++/55082] New: c++11: default member constructor

2012-10-26 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55082 Bug #: 55082 Summary: c++11: default member constructor Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal

[Bug c++/55038] New: c++11: operator +=

2012-10-23 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55038 Bug #: 55038 Summary: c++11: operator += Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: enhancement Priority: P3

[Bug c++/48483] Construct from yourself w/o warning

2012-02-09 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 --- Comment #18 from Lisp2D lisp2d at lisp2d dot net 2012-02-09 16:59:19 UTC --- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483#c2 shows that function calling of object before constructor is bad idea and must be strongly forbidden.

[Bug c++/48483] Construct from yourself w/o warning

2011-04-07 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 --- Comment #10 from Lisp2D lisp2d at lisp2d dot net 2011-04-07 13:19:16 UTC --- (In reply to comment #9) No, the variable is in scope after its identifier, so it can be used in the initializer expression, e.g. int i = sizeof(i); // ok

[Bug c++/48483] Construct from yourself w/o warning

2011-04-07 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 --- Comment #15 from Lisp2D lisp2d at lisp2d dot net 2011-04-07 13:58:38 UTC --- (In reply to comment #12) For the example in comment 2 G++, EDG and Clang++ all accept it without warning. MSVC rejects it, but is wrong to do so. The answer

[Bug c++/48483] New: Construct from yourself w/o warning

2011-04-06 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 Summary: Construct from yourself w/o warning Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo:

[Bug c++/48483] Construct from yourself w/o warning

2011-04-06 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 --- Comment #2 from Lisp2D lisp2d at lisp2d dot net 2011-04-06 21:15:42 UTC --- Try the next example, more close to my code: #includeiostream classA{ public: inta; A(intx):a(x){} intTheInt(){returna;} }; void

[Bug c++/48483] Construct from yourself w/o warning

2011-04-06 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483 --- Comment #7 from Lisp2D lisp2d at lisp2d dot net 2011-04-07 04:33:52 UTC --- The example http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48483#c2 shows a compiler bug. TYPE VARIABLE [ARGUMENT-TO-CONSTRUCT] The compiler must doing like this: 1

[Bug c/48418] New: Bit shift operator =

2011-04-02 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48418 Summary: Bit shift operator = Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org

[Bug c++/48255] New: default constructor with argument INT

2011-03-23 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48255 Summary: default constructor with argument INT Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo:

[Bug c++/48255] default constructor with argument INT

2011-03-23 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48255 --- Comment #2 from Lisp2D lisp2d at lisp2d dot net 2011-03-23 16:15:14 UTC --- found silent conversion class A have explicit A(std::complexlong doubleconst x);

[Bug c++/48185] New: if(struct ...)

2011-03-18 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185 Summary: if(struct ...) Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org

[Bug c++/48185] if(struct ...)

2011-03-18 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185 --- Comment #2 from Lisp2D lisp2d at lisp2d dot net 2011-03-18 17:15:23 UTC --- Code { struct passwd*pwd(getpwuid(...)); if(pwd)return true;} is still compiled. Code if(struct passwd*pwd=getpwuid(...))return; compiled too. But if(struct

[Bug c/46929] New: Xutil.h and Complex - some trouble

2010-12-13 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46929 Summary: Xutil.h and Complex - some trouble Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo:

[Bug c++/39463] New: The type a std::vector cannot work with classes with the protected copy-constructors

2009-03-14 Thread lisp2d at lisp2d dot net
Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39463

[Bug c++/38055] key for compilation -Wconversion

2009-01-23 Thread lisp2d at lisp2d dot net
--- Comment #2 from lisp2d at lisp2d dot net 2009-01-24 06:00 --- The niche is selected incorrectly. Basically the considerable quantity of errors of programming is linked to implicit type conversion. void insert(char*,char,unsigned int){..} insert(..,..,size_t); Example double d

[Bug c/38704] Very bad quality of compilation of a floating point numbers.

2009-01-03 Thread lisp2d at lisp2d dot net
--- Comment #7 from lisp2d at lisp2d dot net 2009-01-03 17:19 --- The type long double does not have uniform standard. Confusion has turned out. Accuracy of type double suits me. Let's complete this talk. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38704

[Bug c/38704] New: Very bad quality of compilation of a floating point numbers.

2009-01-02 Thread lisp2d at lisp2d dot net
. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id

[Bug c/38704] Very bad quality of compilation of a floating point numbers.

2009-01-02 Thread lisp2d at lisp2d dot net
--- Comment #2 from lisp2d at lisp2d dot net 2009-01-02 19:37 --- Quantity of correct bits is 64, the size of long double is 128 bits. Half of quality is reached by usage of operations multiplication, divisions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38704

[Bug c/38704] Very bad quality of compilation of a floating point numbers.

2009-01-02 Thread lisp2d at lisp2d dot net
--- Comment #4 from lisp2d at lisp2d dot net 2009-01-03 00:12 --- __LDBL_DIG__=18 __DBL_DIG__=15 sizeof(long double)=128 bits sizeof(double)=64 bits It is named the legalised crime. If the program is written incorrectly no law will correct it. -- http://gcc.gnu.org/bugzilla

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-25 Thread lisp2d at lisp2d dot net
--- Comment #5 from lisp2d at lisp2d dot net 2008-12-25 14:36 --- Let's start from the beginning. class A{public:intx;A():x(0){};}; class B:publicA{public:inty;B():A(),y(0){};}; class C:publicA{public:intz;C():A(),z(0){};}; B xb; C xc

[Bug c++/38622] New: operator ?: Does not check identity of types

2008-12-24 Thread lisp2d at lisp2d dot net
Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38622

[Bug c++/38623] New: operator ?: Does not check identity of types

2008-12-24 Thread lisp2d at lisp2d dot net
Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38623

[Bug c++/38622] operator ?: Does not check identity of types

2008-12-24 Thread lisp2d at lisp2d dot net
--- Comment #4 from lisp2d at lisp2d dot net 2008-12-25 05:41 --- If commands if and ?: operate on a miscellaneous. Not clearly when works copyconstructor and when there is no. class A{public:intx;A():x(0){};}; class B:publicA{public:inty;B():A(),y(0){};}; class

[Bug c++/38517] At definition of the empty reference the error is not output.

2008-12-15 Thread lisp2d at lisp2d dot net
--- Comment #3 from lisp2d at lisp2d dot net 2008-12-16 05:52 --- More exact example: .h: extern int i; .cpp: int i; // ok -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38517

[Bug c++/38517] New: At definition of the empty reference the error is not output.

2008-12-13 Thread lisp2d at lisp2d dot net
: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38517

[Bug c++/38055] New: key for compilation -Wconversion

2008-11-07 Thread lisp2d at lisp2d dot net
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lisp2d at lisp2d dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38055