public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/48365] New: Non-constant references in std::valarray::operator
@ 2011-03-30 14:11 denin at mail dot ru
  2011-03-30 15:44 ` [Bug libstdc++/48365] " paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: denin at mail dot ru @ 2011-03-30 14:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48365

           Summary: Non-constant references in std::valarray::operator
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: denin@mail.ru


Created attachment 23819
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23819
Test code

When calling "valarray*scalar" arithmetic operators, where scalar is the
element of valarray, it is modified during execution, thus influencig the
result, though STL definition says that parameters of the operator are const
references, and the result is the new valarray object.
Attached is the code that produces output "4:12", while "4:6" expected, even
when compiled with -O0.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-14 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 14:11 [Bug libstdc++/48365] New: Non-constant references in std::valarray::operator denin at mail dot ru
2011-03-30 15:44 ` [Bug libstdc++/48365] " paolo.carlini at oracle dot com
2011-03-31 20:30 ` paolo.carlini at oracle dot com
2011-04-11 18:34 ` paolo.carlini at oracle dot com
2011-06-14 14:11 ` paolo.carlini at oracle dot com
2011-06-14 14:18 ` gdr at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).