chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Add aggressive debugging checks to squash


From: Mario Domenech Goulart
Subject: Re: [Chicken-hackers] [PATCH] Add aggressive debugging checks to squash those damn bugs
Date: Fri, 18 Oct 2013 19:02:14 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Sun, 6 Oct 2013 17:06:00 +0200 Peter Bex <address@hidden> wrote:

> On Sun, Sep 29, 2013 at 10:46:25PM +0200, Peter Bex wrote:
>> The first patch adds assertions to all the type accessors like C_unfix,
>> C_block_{header,item}, C_character_code etc.  It does this through a
>> "check" macro which contains a horrible, evil hack which allows LET-like
>> semantics in C macros, in a bit of a manual way.
>
> Unfortunately, complex statement expressions do not sit well with clang
> and G++.  This causes compiler errors when compiling CHICKEN, eggs or
> programs with these compilers.  Even when gcc is used, chicken.h can be
> included in C++ programs, like for example in the case of "crunch"
> programs or libraries, like sixty-five-oh-two.
>
> I've attempted to rewrite this to use the clang block syntax, but that
> adds more annoyances: you'll need to link against a special LLVM runtime,
> and pass the -fblocks option, which is not recognised by other compilers.
> So it's probably not worth it, and the attached patch disables the
> paranoid debugging code for clang and c++ compilers completely.
>
> If anyone has ideas of how to support these compilers properly (maybe
> C++ can be supported via C++11 lambdas?), feel free to tackle it.
>
> It's disappointing and annoying that this does not work with clang :(
> so I'd really appreciate it if someone more familiar with its inner
> workings could take a closer look at why it's not working.  Its fabled
> good error reporting did not really help much.

Thanks, Peter.  I've pushed your patch.

Best wishes.
Mario
-- 
http://parenteses.org/mario



reply via email to

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