From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5640 invoked by alias); 6 Nov 2013 22:23:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 5630 invoked by uid 89); 6 Nov 2013 22:23:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: dub0-omc1-s18.dub0.hotmail.com Received: from Unknown (HELO dub0-omc1-s18.dub0.hotmail.com) (157.55.0.217) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Nov 2013 22:23:01 +0000 Received: from DUB122-W35 ([157.55.0.238]) by dub0-omc1-s18.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 6 Nov 2013 14:22:53 -0800 X-TMN: [S69GTHmEg+gNAXNV2HYReubmJNYzuSNi] Message-ID: From: Bernd Edlinger To: Dodji Seketeli CC: Jakub Jelinek , =?iso-8859-1?B?TWFudWVsIEzzcGV6LUli4fFleg==?= , gcc-patches Subject: RE: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals Date: Wed, 06 Nov 2013 22:27:00 -0000 In-Reply-To: <87k3gnqj7k.fsf@redhat.com> References: ,<20131031144309.GR27813@tucnak.zalov.cz> <87y559xz7y.fsf@redhat.com>,<20131031173649.GW27813@tucnak.zalov.cz> <87r4awtmnx.fsf@redhat.com>,<20131104115748.GO27813@tucnak.zalov.cz> <87zjpkrx8p.fsf@redhat.com>,,<87k3gnqj7k.fsf@redhat.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00665.txt.bz2 Sorry Dodji, I still do not see how this is supposed to work: If the previous invocation of get_line already had read some characters of the following line(s), how is that information recovered? I see it is copied behind lineptr[cur_len]. But when get_line is re-entered, cur_len is set to zero again. and all that contents up to 16K are forgotten. Right? If an empty line of just a new-line is read, the return value of get_line is 0, and string is "". But the return value of read_line is NULL in that case. Now the function location_get_source_line will leave the while loop. But there may be more lines, propably not just empty ones? How did you test your patch? Regards Bernd.=20=09=09=20=09=20=20=20=09=09=20=20