-----Original Message----- >From: Dave Korn <[EMAIL PROTECTED]> >Sent: Aug 20, 2007 6:25 AM >To: [EMAIL PROTECTED] >Cc: cygwin@cygwin.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: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -- 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/