delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/20/07:26:10

X-Spam-Check-By: sourceware.org
Message-ID: <21121381.1187609140532.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net>
Date: Mon, 20 Aug 2007 07:25:40 -0400 (GMT-04:00)
From: g6522c AT earthlink DOT net
Reply-To: rkies AT cpan DOT org
To: Dave Korn <dave DOT korn AT artimi DOT com>
Subject: RE: Line info causes GCC to bomb?
Cc: cygwin AT cygwin DOT com
Mime-Version: 1.0
X-Mailer: EarthLink Zoo Mail 1.0
X-ELNK-Trace: 0b901cbc512a9d8594f5150ab1c16ac0c864d17e3813b99ae770c547e1c97735bbe6d5463d402a70350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c
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

-----Original Message-----
>From: Dave Korn <dave DOT korn AT artimi DOT com>
>Sent: Aug 20, 2007 6:25 AM
>To: rkies AT cpan DOT org
>Cc: cygwin AT cygwin DOT com
>Subject: RE: Line info causes GCC to bomb?
>
>On 20 August 2007 10:54, g6522c wrote:
>
>[  List Cc'd back in.  http://cygwin.com/acronyms#PPIOSPE, thanks!  ]
>
>>>> This preprocessed input causes GCC (3.4.4) to segfault....
>>>> 
>>>>   # 1 "test.c" 1
>>>> 
>>>>   int main () {
>>>>      return 0;
>>>>   }
>>>> 
>>>> ... and this doesn't:
>>>> 
>>>>   # 1 "test.c"
>>>>   # 1 "test.c" 1
>>>> 
>>>>   int main () {
>>>>     return 0;
>>>>   }
>
>> This is from a different front end that I've put together.  It's referred
>> to in the sig line.  The line numbering is as documented - partially - in
>> the cpp Texinfo manual.  The input seems to be valid for all other builds
>> of GCC.   
>
>  I can't find that syntax described in the documentation, can point me at it?
>
>  I note that gcc doesn't generate code like your first form, it always does it the second way, which makes me think that the first #-directive, the one without the trailing number, acts as some kind of introducer or otherwise triggers some internal struct to be set up in cpp without which the second form, with the trailing number, is invalid.
>
>
>    cheers,
>      DaveK

It's indexed in cpp.info under, "linemarkers."  

The output from cpp also contains other directives between the first two line markers, as in the second form, although I haven't had the opportunity to look at the gcc source to determine their purpose, or what initialization gcc needs for its line numbering.  

If I can locate the relevant routines in gcc I might be able to provide a patch.  My own preprocessor already has the necessary compatibility fix, though untested, because my linux box is waiting for spare parts.

Thanks again,

Robert


----------------------------------------------------------------------------
Ctalk Project Home Page: http://ctalk-lang.sourceforge.net
Mailing List:  ctalk-lang-announce AT lists DOT sourceforge DOT net
----------------------------------------------------------------------------

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

- Raw text -


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