tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] X(X(1)) (nested macro substitution)


From: David Mertens
Subject: Re: [Tinycc-devel] X(X(1)) (nested macro substitution)
Date: Fri, 29 Apr 2016 10:59:39 -0400

On Fri, Apr 29, 2016 at 5:18 AM, Edmund Grimley Evans <address@hidden> wrote:
You may find that TCC's preprocessor is fundamentally broken (wrong
underlying data structures) and can't be patched up. If you are going
to play around with small changes to it, then you should first find a
proper, big test suite. There must be one out there somewhere, perhaps
in GCC's source tree, for example. Otherwise you might find that every
change you make to fix one thing breaks other things.

Another possibility would be to give up on making TCC's preprocessor
conform to the standard. If it correctly implements a well-defined
subset of the standard, and fails with a clear error (apology) in
other cases, then that might be more acceptable than generating
different output from a correct compiler or going into an infinite
loop in certain situations that are hard to describe or identify.

Edmund

I agree with Edmund. I think your efforts would be better spent running TCC against a full preprocessor test suit. Your patch is rather simple and so is probably fine, but I've not looked at it closely enough to give a careful critique.

David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]