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

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
References: <21121381 DOT 1187609140532 DOT JavaMail DOT root AT elwamui-cypress DOT atl DOT sa DOT earthlink DOT net>
Subject: RE: Line info causes GCC to bomb?
Date: Mon, 20 Aug 2007 16:20:42 +0100
Message-ID: <07bd01c7e33d$abf68ac0$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <21121381.1187609140532.JavaMail.root@elwamui-cypress.atl.sa.earthlink.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On , Dave Korn <dave.korn> wrote:

[  Please try to snip rawquotes of email addresses from replies (or even
better, configure your mailer to snip em out), posting someone's address to
the list causes them to receive more spam. 
    (http://cygwin.com/acronyms#PCYMTNQREAIYR)   ]

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

>>  I can't find that syntax described in the documentation, can point me at
>> it?

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

  Ah, found it.  Heh, so it's not documented in the section about "Line
control", it's implicitly documented in the output format section. 

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

  <shrugs>It's an arguable case.  These pseudo-line-directives are part of
the internal interface between parts of the compiler and I think not really
intended for general consumption, even though it is described as "an
extension".  Since the form with the file introducer is what gcc generates,
and is what is guaranteed to work across all versions, I think you should
treat this situation as if there is a documentation error in the cpp manual,
and that it's part of the spec that you need to have an introducer line
before any lines with flags.       

  As for the sources, that's gcc-3.4.4/gcc/cpp*.[ch] for the most part.

    cheers,
      DaveK
--
Can't think of a witty .sigline today....
On 20 August 2007 12:26, g6522c wrote:


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