X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; q=dns; s=default; b=UbezMjlTGcKZhhiq7ejwewgb+A+lO
	00KgIed372c+Yr41vExI5OufxkNpTXFqiR8Oz9YqRNvRg81jLnVUGB7i3cF6b419
	rI/qsWtzyVX6yx1HWNXUGxQMcKYBM9y+Piy2lxKexnXlppB1qf3q+BYmoMjRVqJx
	qZLw8c6q1JByW4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:from:date:message-id:subject:to
	:content-type; s=default; bh=cFP6RFLnxgZn7xDEjQNiQJbp0ro=; b=EwQ
	arX1/pw6KOlnLn45AqYx5AZieErSYzxExCbpqA4HyuT81TtXzNVQpaRs1bkEiJP1
	wXoHYpLNTpG3OTBMIRap4zznHrYJi1YkAlpsZOrMfN7CKQbHzw89QSvOcCTZoUay
	6lyB5eTCy3ntFXhOFON2AqvtoLkLY9VjoMdkC+hM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:sk:g16-v6m, H*c:alternative
X-HELO: mail-it0-f49.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:mime-version:from:date:message-id:subject:to;        bh=2yy7jlGs12+o6p01cHX3xf7rlwMtRuniVhWVINan0vU=;        b=cfLvuurak7HI1QddWBUuuwV+sckV5zczPpjQOZuLs0/4kX5DcHT5TwAjq7QGuteccr         Y/uQsdbzUp0kgXZo+3L4hnyoHWjqj1EFA0cnCA3+wTDw2/dK2UIEuOD9sBaac2uj7/Gj         p5O/jfVuVJzaO7h9ULKniKU32q/BlNkKIiZbMW5z5sE8dw1oOBZ0n8dmdJ+THlLwZoKi         50tGWiS/DUalZFYwEPeRJ0g4SYjfTqsK1v06aJEUo25DM4PV5mY1luuOKxvU9zUX/D+S         Uk71Qnvlq1nnDoIb0JtmP/pWyOw+TZ2mfiwgi3l8svcLYwRwaP4esuqB6tsrYZjcaEem         pmfw==
X-Gm-Message-State: APt69E0ZgdoOB6uOqfDlLIiBIxYTmDmL9DRvfE2SLEYVjKS7mMuJRPxo	23mJBSXWMAsdTCkiYrONVN2iMAu9aYtC30DYjJTZkD4z
X-Google-Smtp-Source: ADUXVKJWCGCwtbdgFyOJKxIzMix8Afwui9vm2tl+28esi6mgSJRDwlutXUzwqTo9O3ZV6LEGyjAeT0OKds4F/GYRB48=
X-Received: by 2002:a24:b610:: with SMTP id g16-v6mr19392374itf.13.1528214184427; Tue, 05 Jun 2018 08:56:24 -0700 (PDT)
MIME-Version: 1.0
From: Ivan Shynkarenka <chronoxor@gmail.com>
Date: Tue, 5 Jun 2018 18:56:03 +0300
Message-ID: <CAHVoUt3YcXjrNQcE9fO2KoXv7OTeXf0LmLGtSQrEeYOzovdgrA@mail.gmail.com>
Subject: GCC 7.3.0 -std=gnu++17 failed to getline() from std::ifstream
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"

 Hello,

I found an issue with Cygwin GCC 7.3.0 when building with -std=gnu++17
flag.

The following test.cpp shows the issue:

#include <fstream>
#include <iostream>

int main(int argc, char** argv)
{
    std::string line;
    std::ifstream stream(" test.cpp");
    while (getline(stream, line))
        std::cout << line << std::endl;
    return 0;
}

Build: g++ -std=gnu++17 test.cpp
Run: Aborted (core dumped)

There is no issue when building with -std=gnu++14

---
Ivan

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

