Small issue on GnuTLS 2.10.2
Simon Josefsson
simon at josefsson.org
Fri Oct 1 14:44:49 CEST 2010
Vivek Dasmohapatra <vivek at collabora.co.uk> writes:
>>> So it would be great if there were a single gcc warning flag to enable
>>> this particular warning, rather than the heavy handed --pedantic.
>>
>> -Wreturn-type might be the one.
>
> It specifically doesn't warn when you return a void expression in
> a void context, currently only --pedantic does that afaik.
You are right, see below. I'm looking into how difficult it would be to
fix the --pedantic warnings too, but it does warn about some constructs
(like variadic CPP function macros) that we only use if they work.
jas at mocca:~$ cat foo.c
void foo (void)
{
return;
}
void bar (void)
{
return foo ();
}
int main (void)
{
bar ();
return 0;
}
jas at mocca:~$ gcc -o foo foo.c -Wreturn-type
jas at mocca:~$
/Simon
More information about the Gnutls-devel
mailing list