Closed aytey closed 3 years ago
Another example:
gcc (SUSE Linux) 10.2.1 20201202 [revision e563687cf9d3d1278f45aaebd03e0f66531076c9]
clang version 11.0.1
gcc -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME
(return code 0)
clang -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME
(return code 0)
cnip $FNAME
mword1.c:2:14 error: expected , or `;' or = after declarator, got `int'
int foo(a, b) int *a, *b;
^
mword1.c:2:26 warning: missing type specifier, assume `int'
int foo(a, b) int *a, *b;
^
mword1.c:2:26 error: expected <identifier> or `(' starting direct-declarator, got `{'
int foo(a, b) int *a, *b;
^
mword1.c:5:2 warning: missing type specifier, assume `int'
return 0;
^
mword1.c:5:2 error: expected <identifier> or `(' starting direct-declarator, got `return'
return 0;
^
mword1.c:5:12 warning: missing type specifier, assume `int'
return 0;
^
mword1.c:5:12 error: expected <identifier> or `(' starting direct-declarator, got `}'
return 0;
^
(return code 0)
int foo(a, b) int *a, *b;
{
*a = *b;
return 0;
}
psychec
versioncommit 6d7b8249e0f28af105112b217cb33a24f666e148
Author: Leandro T. C. Melo <LTCMELO@GMAIL.COM>
Date: Tue Feb 23 07:47:25 2021 -0300
link expression-parsing table in Doxygen documentation
Thank you again, @andrewvaughanj . This one is a duplicate of #6 , though — but it isn't immediate to notice, since the other bug is reported with another title.
Doh 🤦 I'd missed that was reason for the duffs device one failing!
Do you want me to close this?
Yes, I guess this can be closed.
@andrewvaughanj I also amended the title of the other bug so it'll be easier for others to spot.
If eligible for the bounty, I wish this to be donated to a local animal charity of the maintainer's choice
GCC version:
clang version:
Output of
gcc -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME
Output of
clang -Werror -Wall -Wextra -Wpedantic -pedantic -std=c11 -c $FNAME
Output of
cnip $FNAME
Content of file
psychec
version