[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: pcc-cpp heavily broken
From:       Thorsten Glaser <tg () mirbsd ! de>
Date:       2008-11-21 4:31:03
Message-ID: Pine.BSM.4.64L.0811210414030.23487 () herc ! mirbsd ! org
[Download RAW message or body]


Anders Magnusson dixit:

> > I'll dig up some examples. The above one is probably due
> > to weirdly interpreting // as a comment leader, though.
> > 
> That's not weird, it shall do so.

Okay, this is probably the case for a traditional-mode or
lenient-mode switch (where lenient-mode would, as I tried
to express in the bug report I could not create, not be
as restricted as traditional mode, but more useful than
C99 mode – for example like gcpp -x assembler-with-cpp).

> > > > │-           if (rec != "")
> > > > │+           if (rec != "
> > > > │+")
> > 
> > This is not a single, but a double quote…
> > 
> There must be more context, just typing that row do not get the newline result.

Right. For the single-quote case, an example like
│tg@bleu:~ $ cat >testfile <<'EOF'                                                  \
 │> if (rec != '')                                                                  \
 │> second\                                                                         \
 │> line
│> EOF
│tg@bleu:~ $ /usr/libexec/cpp <testfile                                             \
 │# 1 "<stdin>"
│if (rec != '
│')
│secondline
is enough to trigger what I *still*, despite C99, consider a bug.
Where does that newline come from? (Similarily, where do these
newlines at the beginning of the file come from?)

The case for the double-quote bug is appended. Reiser CCCP does
the right things, except (feature or bug?) it doesn't even con-
catenate the split lines. GNU cpp does the right things as well.
pcc cpp fscks up big time.

bye,
//mirabilos
-- 
[00:02] <Vutral> gecko: benutzt du emacs ?
[00:03] <gecko> nö          [00:03] <gecko> nur n normalen mac
[00:04] <Vutral> argl       [00:04] <Vutral> ne den editor
	-- Vutral und gecko2 in #deutsch (NB: Editor? Betriebssystem.)


["dblq_bug.tgz" (APPLICATION/octet-stream)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic