Request for testers for new CPP code

Neil Booth NeilB@earthling.net
Fri Oct 20 16:03:00 GMT 2000


I've attached 3 files; which are gzipped diffs to the main directory,
the po directory and the testsuite/gcc.dg/cpp directory.

This code implements a new macro-expander that's cleaner than the
current one, and hopefully works correctly in all cases.  It works
similarly to the old text-based ones, but on tokens instead.  The
patch also fixes various other problems, like empty files returning an
error code, and has improvements such as cleaner preprocessed output,
more consistent diagnostics, and more helpful diagnostics (e.g. it
tells you which tokens is can't paste).  It also makes a good start at
separating various parts of cpplib that were intermingled before, and
reducing the external cpplib interface to a minimum.  Various code
that is only used for the stand-alone preprocessor is now in cppmain.c
rather than the library.

Unforunately a smaller patch was not possible.  I'm looking for people
to test it before I commit it, particularly on architectures and OSes
other than i386 Linux, as I don't have access to them.

Known issues:-

o Integrated cpp does not work

o -g3 does not emit debug info for #pragma poison

o "#if !defined" include optimisation is not implemented (but the #ifndef
  one is).  This causes a gcc.dg/cpp testsuite failure (mi1.c).

I'm working on these, and will get integrated cpp working before
committing.  I think the last 2 can wait until after a commit.

For me, it passes the C tests, with the only new failure being mi1.c,
the include optimization mentioned above.  Other front ends are fine,
except g++, which has hundreds of errors of the form:-

/libstdc++/exception:42: undefined reference to `exception virtual table'
/libstdc++/tinfo2.cc:240: undefined reference to `type_info type_info function'

etc.  I have no idea what they are; but it looks like a setup problem
rather than a problem with this patch (??).

Cheers,

Neil.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cppdir.diff.gz
Type: application/x-gzip
Size: 4293 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20001020/4762fc31/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maindir.diff.gz
Type: application/x-gzip
Size: 80327 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20001020/4762fc31/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: podir.diff.gz
Type: application/x-gzip
Size: 254 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20001020/4762fc31/attachment-0002.bin>


More information about the Gcc-patches mailing list