delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/06/11/16:38:40

X-Recipient: archive-cygwin AT delorie DOT 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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=IngDR5vTEHzKPTpz
Oq+F6WDiMUCCZa2CKBLw5JSxxYY/pK1b5RaWZNXae9oUw/9eMLyYmTz0qXs+iJYE
3ja7zMTbHnpuTeCdra7UYq/xygdBmGE8rhv7M8eLLbahfUKkDokVfbOl6nkGu4PC
dUbwk72Ha1JNX90Y+GBFM/LCo+o=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=OWZHeZyNmneW4Bj21xUOdr
5upMo=; b=Jce45ut/+qL66wsz+j7LmgCN651Hu9UWZ0ws6ASAUwJQtLQonbS1TO
sO6bVsai9iuOkyQVOsi/esYX/EaIP2xjVDm1Nj+kKhqlH7vkbWLh5ZYCzaHqoZXL
c78eHktiShb/f1sANS+zgGvL8sgCJKwrdW2ygF8eUj1lRsmrgo0nw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:sk:61-v6mr, HX-HELO:sk:mail-pl, H*r:sk:mail-pl, HContent-Transfer-Encoding:8bit
X-HELO: mail-pl0-f44.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:newsgroups:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t0B/WZ1B0zAsH7dwqEy2wuU06N5kbj1sgkTCSeyJjGE=; b=FUemu6z9lL6K/vPxd0gsUidek3pKAffCRCJyR9OYpIwLZEmaGlnSkzBYikK9VR6SAZ QBGwARFHak/COJkc0b59M+WlYxw2A6ChkocyAJO2Px6a5KSTnKnvyxuF1ux4AzckHqdT q3XYT68L07ZVSayzn5MTFgVXBO1vBSDIlqueXfGuIi6cKCWjl7F2evPLdblS3AyaT5lr yUaVL8yqy4qejRpCf6tUhqtO95hfG5dh3FSxPf2ZpJS9qrywSLjzf0Wkns9PpTBo2ACw XTasAau4W/JYvgjhcr4TX24fj5bcn3dazuqOCfYQdKC5KBT+SWKNgJ7QL4ntYflLSB4W gLxw==
X-Gm-Message-State: APt69E2qX6yqoORc4B8KxnQlsae1Slw362/eE+cnuB5kZsWa8jK9ZiWH /vMA9m9zDRRvPI0iI00tfCCXv+s=
X-Google-Smtp-Source: ADUXVKJZDxGfZwHKIggE/mQfZMf+YiF6CKDvArCZDXXOfPxBAXplG9kN/rWj/db0aGxPsjAjObYHrA==
X-Received: by 2002:a17:902:43:: with SMTP id 61-v6mr731624pla.112.1528749506191; Mon, 11 Jun 2018 13:38:26 -0700 (PDT)
Subject: Re: GCC 7.3.0 -std=gnu++17 failed to getline() from std::ifstream
To: cygwin AT cygwin DOT com
Newsgroups: gmane.os.cygwin
References: <CAHVoUt2pHP46o6ERwx9HB5=Dn-J9xv5i-53RYtJbdev-K9DCeQ AT mail DOT gmail DOT com> <a7b8e684-f985-f8f2-c7f2-79e618e8ece1 AT gmail DOT com> <0d0d9dc4-5cce-724a-6fb2-7bf0a5a71db4 AT otoy DOT com> <1e9791c0-fbc9-6507-58bc-6864ae65c967 AT gmail DOT com>
From: Ross Smith <ross DOT smith AT otoy DOT com>
Message-ID: <c5edd175-400b-4f36-0413-9b951be4b09b@otoy.com>
Date: Tue, 12 Jun 2018 08:38:21 +1200
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <1e9791c0-fbc9-6507-58bc-6864ae65c967@gmail.com>
Note-from-DJ: This may be spam

On 2018-06-12 02:17, Marco Atzeri wrote:
> On 6/11/2018 4:11 AM, Ross Smith wrote:
>> On 2018-06-06 09:00, Marco Atzeri wrote:
>>> On 6/5/2018 10:32 PM, Ivan Shynkarenka wrote:
>>>>   Hello
>>>>
>>>> I use x64 bit Cygwin and it failed in my home, work and Appveyor.  I 
>>>> add
>>>> cygcheck.out with my environment.
>>>>
>>>> I'm sorry about misspell prefix space in my prev example. Please try 
>>>> the
>>>> following one:
>>>>
>>>> #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;
>>>> }
>>>>
>>>> g++ -std=gnu++17 test.cpp
>>>
>>> works fine on 32 bit and 64 bit on my W7
>>
>> I'm having the same problem. My test program:
>>
>> #include <fstream>
>> #include <iostream>
>> int main() {
>>      std::ifstream in("demo.cpp");
> 
> 
> with this change does not segfault
> 
>    std::ifstream stream("demo.cpp\n");

It doesn't segfault because it doesn't open the file, because no file
named "demo.cpp\n" exists. I don't know WTF you thought you were doing
here.

Ross Smith

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019