public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59550] New: compiler crash when forming a pointer to a reference would be needed in std::initalizer_list
@ 2013-12-18 19:58 ali.baharev at gmail dot com
  2015-03-19 10:19 ` [Bug c++/59550] " paolo.carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: ali.baharev at gmail dot com @ 2013-12-18 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59550
           Summary: compiler crash when forming a pointer to a reference
                    would be needed in std::initalizer_list
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ali.baharev at gmail dot com

Code:

#include <fstream>
#include <initializer_list>
using namespace std;

void writeSomething(initializer_list<ofstream&> args) {
    for (auto f : args )
        f << "hello" << endl;
}

int main() {
    ofstream outputFile("data_1.txt");
    writeSomething({outputFile});
}

Online demonstration:

http://ideone.com/vTHDFy

This code came up at 

http://stackoverflow.com/q/20665699/341970


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

* [Bug c++/59550] compiler crash when forming a pointer to a reference would be needed in std::initalizer_list
  2013-12-18 19:58 [Bug c++/59550] New: compiler crash when forming a pointer to a reference would be needed in std::initalizer_list ali.baharev at gmail dot com
@ 2015-03-19 10:19 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-19 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59550

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.9.1, 5.0
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed in 4.9.1.


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

end of thread, other threads:[~2015-03-19 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18 19:58 [Bug c++/59550] New: compiler crash when forming a pointer to a reference would be needed in std::initalizer_list ali.baharev at gmail dot com
2015-03-19 10:19 ` [Bug c++/59550] " paolo.carlini at oracle dot com

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).