[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[creduce-dev] Possible creduce' improvements
Hi!
While creducing multi-files I see 3 small areas for improvement.
By hand I can made 3 more simplifications.
First: simplify external function call
Second: 'inline' typedef
Third: replace a big integer constant by a little one
Thank you,
Dmitry
$ creduce --version
creduce 2.11.0 (8a67e69)
Creduce end with the following
******** /home/dimhen/errs/gcc10/PR92254/d.i ********
int b, c;
int a(int *, int, int, int, int);
unsigned f(int *, unsigned short);
unsigned f(int *d, unsigned short e) {
b = 0;
if (e) {
a(0, 0, 0, 0, 0);
if (c)
return 0;
}
return a(d, 0, 0, 0, 0);
}
And by hand I change int a(int *, int, int, int, int) ---> int a(int *)
Function 'a' used only in this file.
Second and third are about
******** /home/dimhen/errs/gcc10/PR92254/c.i ********
typedef void a;
typedef void b;
unsigned f1(b *, a *);
unsigned f2(int *, unsigned short);
unsigned f1(b *c, a *d) {
int *a = c;
(void)d;
if (!c)
return 87;
return f2(a, 0);
}
Second: may be substitute 'typedef void ...' into it' usage?
Third: maybe 'return 1' instead of 'return 87' ?