| delorie.com/archives/browse.cgi | search |
| 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:to:from:subject:date:message-id:references | |
| :mime-version:content-type:content-transfer-encoding | |
| :in-reply-to; q=dns; s=default; b=dHkRX8PMHovnLl2C1803nMQ1QXeRrl | |
| tN7NCzqpqPVS3btPXG4hy26nrcPOtPKDWlJXxhJENd4pDfUlTtPwY59+bwPvrmT+ | |
| YEuUU+XQEF+okXDTpPpcsoAA/kN6R+NXW9e5I6BbcXCGH0Z55GAFZeMDQyIK2onF | |
| jEa6GXz9ZvUpQ= | |
| 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:to:from:subject:date:message-id:references | |
| :mime-version:content-type:content-transfer-encoding | |
| :in-reply-to; s=default; bh=BM4qFfORn7OXCaeG2uUdHaBUs4I=; b=iUPv | |
| 2m1/hlfhAz73MgXm3RJzDt5W6IwlRwddHXrFkucoUu573f5WsklHA0oH96Fvbz/4 | |
| l1hMjtEmPiprf+RHlztU9whFCvABJ3beNFeqdV+I0vp/IH9Kvu42MHxZCMSFsbqA | |
| bFdA3YYkj7YxcYIn8c/sZsk+i4Qb7RTCKEY+lsE= | |
| 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=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*r:Unknown, HContent-Transfer-Encoding:8bit |
| X-HELO: | blaine.gmane.org |
| To: | cygwin AT cygwin DOT com |
| From: | Ross Smith <ross DOT smith AT otoy DOT com> |
| Subject: | Re: GCC 7.3.0 -std=gnu++17 failed to getline() from std::ifstream |
| Date: | Tue, 12 Jun 2018 08:38:21 +1200 |
| Lines: | 47 |
| Message-ID: | <c5edd175-400b-4f36-0413-9b951be4b09b@otoy.com> |
| 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> |
| Mime-Version: | 1.0 |
| User-Agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
| In-Reply-To: | <1e9791c0-fbc9-6507-58bc-6864ae65c967@gmail.com> |
| X-IsSubscribed: | yes |
| 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |