This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Line info causes GCC to bomb?

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

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

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

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]