tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] { .field = value } struct initialization alternative


From: Ivan Medoedov
Subject: Re: [Tinycc-devel] { .field = value } struct initialization alternative
Date: Sun, 21 Jul 2019 22:48:57 +0200

Thanks, I'll try that.

On Sun, Jul 21, 2019 at 9:55 PM Pascal Cuoq <address@hidden> wrote:
Hello,

On 21 Jul 2019, at 21:37, Ivan Medoedov <address@hidden> wrote:

No, it's a compilation error (error: field expected), and I can't reproduce it in a small program. The original file has hundreds of thousands of loc.

Large inputs that cause unwarranted compilation errors are easy to make small by using C-Reduce: https://embed.cs.utah.edu/creduce/ (probably already a package of your reputable Linux distribution).

C-Reduce takes as argument a script that indicates that a variant of the initial input is still interesting. In your case, the input is interesting because it is accepted by (say) “gcc -std=c11 -pedantic”  and when compiled with “tcc”, causes stderr to contain “error: field expected”.

It takes a bit of getting used to to wield C-Reduce efficiently; for instance not specifying “-std=c11 -pedantic” or not grepping specifically for “error: field expected” is likely to yield a different bug than the one that was initially bothering you, that C-Reduce will introduce as it reduces the input. John Regehr compares it to “every story where a genie is in a position to grant a wish”.

Even with the quirks that manifest themselves the first couple of times you use it, C-Reduce still helps getting bugs fixed faster than reducing  inputs by hand or not reporting bugs properly because reducing them looks daunting.

Pascal

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

reply via email to

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