[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread pcarlini at suse dot de
--- Comment #18 from pcarlini at suse dot de 2007-01-12 14:57 --- Fixed for 4.2.0. -- pcarlini at suse dot de changed: What|Removed |Added Status|ASSIGNED

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread paolo at gcc dot gnu dot org
--- Comment #17 from paolo at gcc dot gnu dot org 2007-01-12 14:56 --- Subject: Bug 30416 Author: paolo Date: Fri Jan 12 14:56:29 2007 New Revision: 120725 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120725 Log: 2007-01-12 Paolo Carlini <[EMAIL PROTECTED]> PR libst

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread paolo at gcc dot gnu dot org
--- Comment #16 from paolo at gcc dot gnu dot org 2007-01-12 13:35 --- Subject: Bug 30416 Author: paolo Date: Fri Jan 12 13:34:47 2007 New Revision: 120722 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120722 Log: 2007-01-12 Paolo Carlini <[EMAIL PROTECTED]> PR libst

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread gdr at integrable-solutions dot net
--- Comment #15 from gdr at integrable-solutions dot net 2007-01-12 13:06 --- Subject: Re: SIGSEGV in valarray::cshift(n) on empty array "paolo at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes: | Subject: Bug 30416 | | Author: paolo | Date: Fri Jan 12 11:09:26 2007 | New Revision:

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread pcarlini at suse dot de
-- pcarlini at suse dot de changed: What|Removed |Added Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30416

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-12 Thread paolo at gcc dot gnu dot org
--- Comment #14 from paolo at gcc dot gnu dot org 2007-01-12 11:09 --- Subject: Bug 30416 Author: paolo Date: Fri Jan 12 11:09:26 2007 New Revision: 120720 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120720 Log: 2007-01-12 Paolo Carlini <[EMAIL PROTECTED]> PR libst

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-10 Thread pcarlini at suse dot de
--- Comment #13 from pcarlini at suse dot de 2007-01-10 23:47 --- Ok, thanks a lot. I'm going to work on those changes for v3. -- pcarlini at suse dot de changed: What|Removed |Added -

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-10 Thread gdr at integrable-solutions dot net
--- Comment #12 from gdr at integrable-solutions dot net 2007-01-10 23:27 --- Subject: Re: SIGSEGV in valarray::cshift(n) on empty array "pcarlini at suse dot de" <[EMAIL PROTECTED]> writes: | Forgot: assuming we imagine the standard clarified per your proposal | on LWG (or read as s

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-10 Thread pcarlini at suse dot de
--- Comment #11 from pcarlini at suse dot de 2007-01-10 19:18 --- Forgot: assuming we imagine the standard clarified per your proposal on LWG (or read as such for all practical matters), I understand that not segfaulting when size == 0 would be a conforming behavior. Then, in v3, we coul

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-10 Thread pcarlini at suse dot de
--- Comment #10 from pcarlini at suse dot de 2007-01-10 18:56 --- (In reply to comment #8) > Paolo -- there is what the standard says, and what we can or should implement. > I believe there is a genuine bug in the standard here, no matter how > easy it is to avoid the segmentation fault.

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread sebor at roguewave dot com
--- Comment #9 from sebor at roguewave dot com 2007-01-10 05:55 --- Even if the spec did permit undefined behavior it would make sense to implement something reasonable if it's easy (as Paolo suggests it might be) and if the cost is acceptable. But just to put your mind at ease I'll writ

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread gdr at integrable-solutions dot net
--- Comment #8 from gdr at integrable-solutions dot net 2007-01-10 03:37 --- Subject: Re: SIGSEGV in valarray::cshift(n) on empty array "pcarlini at suse dot de" <[EMAIL PROTECTED]> writes: | Well, IMHO, avoiding this SIGSEGV is so easy, I would change anyway both shift | and cshift

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread gdr at integrable-solutions dot net
--- Comment #7 from gdr at integrable-solutions dot net 2007-01-10 03:33 --- Subject: Re: SIGSEGV in valarray::cshift(n) on empty array "sebor at roguewave dot com" <[EMAIL PROTECTED]> writes: | (In reply to comment #3) | > The standard refers to "(l+n)%size()", so if size()=0, that

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread gdr at integrable-solutions dot net
--- Comment #6 from gdr at integrable-solutions dot net 2007-01-10 03:32 --- Subject: Re: SIGSEGV in valarray::cshift(n) on empty array "chris at bubblescope dot net" <[EMAIL PROTECTED]> writes: | The standard refers to "(l+n)%size()", so if size()=0, that seems to be | undefined. On

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread pcarlini at suse dot de
--- Comment #5 from pcarlini at suse dot de 2007-01-09 23:17 --- Well, IMHO, avoiding this SIGSEGV is so easy, I would change anyway both shift and cshift (i.e., wrap everything in a check that size() > 0), and be done with it, if nobody strongly disagree... While we are at it, quickly l

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread sebor at roguewave dot com
--- Comment #4 from sebor at roguewave dot com 2007-01-09 22:34 --- (In reply to comment #3) > The standard refers to "(l+n)%size()", so if size()=0, that seems to be > undefined. On the other hand, it seems fairly obvious what should happen in > this case (ie nothing). The requirement

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread chris at bubblescope dot net
--- Comment #3 from chris at bubblescope dot net 2007-01-09 22:21 --- The standard refers to "(l+n)%size()", so if size()=0, that seems to be undefined. On the other hand, it seems fairly obvious what should happen in this case (ie nothing). On an unrelated note, isn't there a another b

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread gdr at integrable-solutions dot net
--- Comment #2 from gdr at integrable-solutions dot net 2007-01-09 22:05 --- Subject: Re: New: SIGSEGV in valarray::cshift(n) on empty array "sebor at roguewave dot com" <[EMAIL PROTECTED]> writes: | AFAIK, the program below should have well-defined behavior but it abends with | gcc

[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

2007-01-09 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-01-09 22:02 --- Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCON